summaryrefslogtreecommitdiff
path: root/include/git2/annotated_commit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/annotated_commit.h')
-rw-r--r--include/git2/annotated_commit.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/annotated_commit.h b/include/git2/annotated_commit.h
index 7fb896a5f..fa795bfc4 100644
--- a/include/git2/annotated_commit.h
+++ b/include/git2/annotated_commit.h
@@ -104,6 +104,15 @@ GIT_EXTERN(const git_oid *) git_annotated_commit_id(
const git_annotated_commit *commit);
/**
+ * Get the refname that the given `git_annotated_commit` refers to.
+ *
+ * @param commit the given annotated commit
+ * @return ref name.
+ */
+GIT_EXTERN(const char *) git_annotated_commit_ref(
+ const git_annotated_commit *commit);
+
+/**
* Frees a `git_annotated_commit`.
*
* @param commit annotated commit to free