lib/gitlab_git/repository.rb in gitlab_git-10.4.0 vs lib/gitlab_git/repository.rb in gitlab_git-10.4.1
- old
+ new
@@ -96,17 +96,20 @@
def tags
rugged.references.each("refs/tags/*").map do |ref|
message = nil
if ref.target.is_a?(Rugged::Tag::Annotation)
+ object = ref.target
tag_message = ref.target.message
if tag_message.respond_to?(:chomp)
message = tag_message.chomp
end
+ else
+ object = nil # Lightweight tags aren't git objects
end
- Tag.new(self, ref.name, ref.target, message)
+ Tag.new(self, object, ref.name, ref.target, message)
end.sort_by(&:name)
end
# Returns true if the given tag exists
#