diff options
author | Nikolai Vladimirov <nikolay@vladimiroff.com> | 2013-08-25 15:59:50 +0300 |
---|---|---|
committer | Nikolai Vladimirov <nikolay@vladimiroff.com> | 2013-08-26 08:04:10 +0300 |
commit | 504850cdf56190a61782abfec37f3533b42d769e (patch) | |
tree | a2a1009690f4b65a8989a34182faa2b979f17a1f /src/refs.c | |
parent | a07db1a1e03c42da5e9132c86776cb5c1ab89214 (diff) | |
download | libgit2-504850cdf56190a61782abfec37f3533b42d769e.tar.gz |
refs: add git_reference_is_tag
Diffstat (limited to 'src/refs.c')
-rw-r--r-- | src/refs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c index c0e460cc3..6cc937fda 100644 --- a/src/refs.c +++ b/src/refs.c @@ -952,6 +952,17 @@ int git_reference_is_remote(git_reference *ref) return git_reference__is_remote(ref->name); } +int git_reference__is_tag(const char *ref_name) +{ + return git__prefixcmp(ref_name, GIT_REFS_TAGS_DIR) == 0; +} + +int git_reference_is_tag(git_reference *ref) +{ + assert(ref); + return git_reference__is_tag(ref->name); +} + static int peel_error(int error, git_reference *ref, const char* msg) { giterr_set( |