summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-08-26 03:32:09 -0700
committerVicent Martí <vicent@github.com>2013-08-26 03:32:09 -0700
commitba7cc8d2f714875736a3c6f5e9cc720170a2166e (patch)
treea2a1009690f4b65a8989a34182faa2b979f17a1f /include
parenta07db1a1e03c42da5e9132c86776cb5c1ab89214 (diff)
parent504850cdf56190a61782abfec37f3533b42d769e (diff)
downloadlibgit2-ba7cc8d2f714875736a3c6f5e9cc720170a2166e.tar.gz
Merge pull request #1810 from nvloff/reference_is_tag
refs: add git_reference_is_tag
Diffstat (limited to 'include')
-rw-r--r--include/git2/refs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 205bfe59d..4871e9820 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -442,6 +442,15 @@ GIT_EXTERN(int) git_reference_is_branch(git_reference *ref);
*/
GIT_EXTERN(int) git_reference_is_remote(git_reference *ref);
+/**
+ * Check if a reference is a tag
+ *
+ * @param ref A git reference
+ *
+ * @return 1 when the reference lives in the refs/tags
+ * namespace; 0 otherwise.
+ */
+GIT_EXTERN(int) git_reference_is_tag(git_reference *ref);
typedef enum {
GIT_REF_FORMAT_NORMAL = 0,