summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 2dc137692..31bf997fe 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -556,6 +556,18 @@ GIT_EXTERN(int) git_reference_foreach_glob(
GIT_EXTERN(int) git_reference_has_log(git_reference *ref);
/**
+ * Ensure there is a reflog for a particular reference.
+ *
+ * Make sure that successive updates to the reference will append to
+ * its log.
+ *
+ * @param repo the repository
+ * @param refname the reference's name
+ * @return 0 or an error code.
+ */
+GIT_EXTERN(int) git_reference_ensure_log(git_repository *repo, const char *refname);
+
+/**
* Check if a reference is a local branch.
*
* @param ref A git reference