summaryrefslogtreecommitdiff
path: root/src/refdb.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-06-28 06:39:38 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-30 15:44:32 +0200
commitab8d9242f54e2c570f86a45a509b9420911a4d44 (patch)
tree6070f721e7e93982a0fe37882e5700de5c1186a9 /src/refdb.h
parentbdeb8772fe846eeeea92cb2d9adb85315f3b8417 (diff)
downloadlibgit2-ab8d9242f54e2c570f86a45a509b9420911a4d44.tar.gz
Introduce reference transactions
A transaction allows you to lock multiple references and set up changes for them before applying the changes all at once (or as close as the backend supports). This can be used for replication purposes, or for making sure some operations run when the reference is locked and thus cannot be changed.
Diffstat (limited to 'src/refdb.h')
-rw-r--r--src/refdb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/refdb.h b/src/refdb.h
index cbad86faf..4ee3b8065 100644
--- a/src/refdb.h
+++ b/src/refdb.h
@@ -51,6 +51,7 @@ int git_refdb_reflog_write(git_reflog *reflog);
int git_refdb_has_log(git_refdb *db, const char *refname);
int git_refdb_ensure_log(git_refdb *refdb, const char *refname);
-
+int git_refdb_lock(void **payload, git_refdb *db, const char *refname);
+int git_refdb_unlock(git_refdb *db, void *payload, int success, int update_reflog, const git_reference *ref, const git_signature *sig, const char *message);
#endif