diff options
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 |