Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-09-27 06:07:31 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-10-28 19:53:18 +0300
commitfa3bbd449efb69a42a2347c3c3fa08cd822c2471 (patch)
treecee7557e3a83dd18fb8f6162b9e7333f391e0ce4 /app/services/git_tag_push_service.rb
parent5742f4a6287927972790d9f20d671c505f149856 (diff)
Fix lightweight tags not processed correctly by GitTagPushService
When we updated gitlab_git to 10.4.1, `tag.target` changed from pointing to the sha of the tag to the sha of the commit the tag points to. The problem is that only annotated tags have `object_sha`s, lightweight tags don't (it's nil), so (only) in their case we still need to use `tag.target`.
Diffstat (limited to 'app/services/git_tag_push_service.rb')
-rw-r--r--app/services/git_tag_push_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/git_tag_push_service.rb b/app/services/git_tag_push_service.rb
index e6002b03b93..20a4445bddf 100644
--- a/app/services/git_tag_push_service.rb
+++ b/app/services/git_tag_push_service.rb
@@ -27,8 +27,8 @@ class GitTagPushService < BaseService
tag_name = Gitlab::Git.ref_name(params[:ref])
tag = project.repository.find_tag(tag_name)
- if tag && tag.object_sha == params[:newrev]
- commit = project.commit(tag.target)
+ if tag && tag.target == params[:newrev]
+ commit = project.commit(tag.dereferenced_target)
commits = [commit].compact
message = tag.message
end