diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-12-18 19:41:01 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-12-18 19:41:01 +0100 |
commit | cc098a7994a56a515311255ea7e4d0412b514879 (patch) | |
tree | 77760f362e42c07a32e06bb7ea3e7dea10d54890 /include/git2/refs.h | |
parent | a7ecd1a9e36df5d6843c1863542c02d777e9e8b5 (diff) | |
download | libgit2-cmn/ref-txn.tar.gz |
wipcmn/ref-txn
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r-- | include/git2/refs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index e2bfa9615..79cfcb3e3 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -569,6 +569,16 @@ GIT_EXTERN(int) git_reference_is_valid_name(const char *refname); */ GIT_EXTERN(const char *) git_reference_shorthand(git_reference *ref); +/** + * Start a new transaction for the specified reference + * + * Lock the reference and return a transaction that can be used to + * modify the reference under lock. You must either commit or rollback + * the transaction, or it will remain locked. + */ +GIT_EXTERN(int) git_reference_transaction_new(git_reference_transaction **out, git_repository *repo, const char *name); + +GIT_EXTERN(int) git_reference_transaction_set_reference((git_reference_transaction *txn, git_reference *ref); /** @} */ GIT_END_DECL |