Commit f8478a27 authored by Nick Thomas's avatar Nick Thomas

Fix EE-only uses of Gitlab::Git::Tag broken in b304fd79

parent 0221d6c9
......@@ -29,7 +29,8 @@ module RepositoryMirroring
def remote_tags(remote)
gitlab_shell.list_remote_tags(storage_path, path_with_namespace, remote).map do |name, target|
Gitlab::Git::Tag.new(raw_repository, name, target)
target_commit = Gitlab::Git::Commit.find(raw_repository, target)
Gitlab::Git::Tag.new(raw_repository, name, target, target_commit)
end
end
......
......@@ -205,8 +205,10 @@ describe Projects::UpdateRemoteMirrorService do
def generate_tags(repository, *tag_names)
tag_names.each_with_object([]) do |name, tags|
target_commit = repository.find_tag(name).try(:dereferenced_target).try(:raw_commit)
tags << Gitlab::Git::Tag.new(repository.raw_repository, name, target_commit)
tag = repository.find_tag(name)
target = tag.try(:target)
target_commit = tag.try(:dereferenced_target)
tags << Gitlab::Git::Tag.new(repository.raw_repository, name, target, target_commit)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment