summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-07-20 13:06:56 +0200
committerGitHub <noreply@github.com>2018-07-20 13:06:56 +0200
commitea9e2c1a4a16b572a3621d9bd7b1383365701b9e (patch)
tree8fbfc6894cb319db5606da3c314edc95c2340ae4 /include/git2
parent0652abaaeaff768e78a65464e59bd1896ce2f6ce (diff)
parentb24202e15462802f7c5ff4c550949453dcbd0da3 (diff)
downloadlibgit2-ea9e2c1a4a16b572a3621d9bd7b1383365701b9e.tar.gz
Merge pull request #4692 from tiennou/examples/checkout
Add a checkout example
Diffstat (limited to 'include/git2')
-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