diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2014-10-09 10:49:37 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2014-10-09 10:49:37 -0400 |
| commit | 10cf4b26a0810718c8ddd9221f5691af47498b4e (patch) | |
| tree | 0c359ccd1ed738a98ffec6aa439ced8e250a66b3 /include/git2/sys | |
| parent | 8be28acfcd26b66275abe225700b24c838bbfd69 (diff) | |
| parent | c327d5db8b62e42f62a0b9e54b61b5f857036ca5 (diff) | |
| download | libgit2-10cf4b26a0810718c8ddd9221f5691af47498b4e.tar.gz | |
Merge pull request #2448 from libgit2/cmn/reference-transaction
Introduce reference transactions
Diffstat (limited to 'include/git2/sys')
| -rw-r--r-- | include/git2/sys/refdb_backend.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h index 3b216a287..d943e550f 100644 --- a/include/git2/sys/refdb_backend.h +++ b/include/git2/sys/refdb_backend.h @@ -153,6 +153,19 @@ struct git_refdb_backend { * Remove a reflog. */ int (*reflog_delete)(git_refdb_backend *backend, const char *name); + + /** + * Lock a reference. The opaque parameter will be passed to the unlock function + */ + int (*lock)(void **payload_out, git_refdb_backend *backend, const char *refname); + + /** + * Unlock a reference. Only one of target or symbolic_target + * will be set. success indicates whether to update the + * reference or discard the lock (if it's false) + */ + int (*unlock)(git_refdb_backend *backend, void *payload, int success, int update_reflog, + const git_reference *ref, const git_signature *sig, const char *message); }; #define GIT_REFDB_BACKEND_VERSION 1 |
