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:
authorLin Jen-Shin <godfat@godfat.org>2017-01-04 17:50:01 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-01-04 17:50:01 +0300
commitecac2f1122f093455e7b9e5d054157241dcd5cff (patch)
tree5a55a408ae4c439ee6cf6de234d9765fdc656f05 /app/services/git_operation_service.rb
parentc1a75c3c0b59af7a9e6af3ff834adf56256aa2ce (diff)
Update the comment:
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_20876648
Diffstat (limited to 'app/services/git_operation_service.rb')
-rw-r--r--app/services/git_operation_service.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index 5acfdb0f9e2..f36c0b082e4 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -26,10 +26,12 @@ class GitOperationService
oldrev = Gitlab::Git::BLANK_SHA
with_hooks(ref, newrev, oldrev) do |service|
+ # We want to pass the OID of the tag object to the hooks. For an
+ # annotated tag we don't know that OID until after the tag object
+ # (raw_tag) is created in the repository. That is why we have to
+ # update the value after creating the tag object. Only the
+ # "post-receive" hook will receive the correct value in this case.
raw_tag = repository.rugged.tags.create(tag_name, newrev, options)
-
- # If raw_tag is an annotated tag, we'll need to update newrev to point
- # to the new revision.
service.newrev = raw_tag.target_id
end
end