summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2013-12-18 09:33:45 -0800
committerVicent Marti <vicent@github.com>2013-12-18 09:33:45 -0800
commit4e1f517c61fef323b9cb3acedd19ce7859a8e546 (patch)
tree87823d6c36e00b3098069142ba9e630e2570f1b7 /include/git2/sys
parenta7ecd1a9e36df5d6843c1863542c02d777e9e8b5 (diff)
parentf21051297cc698644ea0dc9c7122ec944dba2863 (diff)
downloadlibgit2-4e1f517c61fef323b9cb3acedd19ce7859a8e546.tar.gz
Merge pull request #1920 from libgit2/cmn/ref-with-log
Reference operations with log
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/refdb_backend.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h
index 9cf5073fb..5bbd4ba4c 100644
--- a/include/git2/sys/refdb_backend.h
+++ b/include/git2/sys/refdb_backend.h
@@ -93,11 +93,13 @@ struct git_refdb_backend {
* must provide this function.
*/
int (*write)(git_refdb_backend *backend,
- const git_reference *ref, int force);
+ const git_reference *ref, int force,
+ const git_signature *who, const char *message);
int (*rename)(
git_reference **out, git_refdb_backend *backend,
- const char *old_name, const char *new_name, int force);
+ const char *old_name, const char *new_name, int force,
+ const git_signature *who, const char *message);
/**
* Deletes the given reference from the refdb. A refdb implementation
@@ -115,6 +117,17 @@ struct git_refdb_backend {
int (*compress)(git_refdb_backend *backend);
/**
+ * Query whether a particular reference has a log (may be empty)
+ */
+ int (*has_log)(git_refdb_backend *backend, const char *refname);
+
+ /**
+ * Make sure a particular reference will have a reflog which
+ * will be appended to on writes.
+ */
+ int (*ensure_log)(git_refdb_backend *backend, const char *refname);
+
+ /**
* Frees any resources held by the refdb. A refdb implementation may
* provide this function; if it is not provided, nothing will be done.
*/