lib/gitlab_git/repository.rb in gitlab_git-10.0.2 vs lib/gitlab_git/repository.rb in gitlab_git-10.1.0
- old
+ new
@@ -101,9 +101,16 @@
Tag.new(ref.name, ref.target, message)
end.sort_by(&:name)
end
+ # Returns true if the given tag exists
+ #
+ # name - The name of the tag as a String.
+ def tag_exists?(name)
+ !!rugged.tags[name]
+ end
+
# Returns an Array of branch and tag names
def ref_names
branch_names + tag_names
end