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:31:06 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-01-04 17:31:06 +0300
commit14c4db2ae4efa1187476f11569df1b77c9c055fa (patch)
treeb0cf16353ffeb6a1b2d32f94aa856a1795e951ff /app/services/git_operation_service.rb
parent104bac3d215383b76b058e8f61b90fdfac936341 (diff)
Add a comment to explain why newrev should be updated
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_20301332
Diffstat (limited to 'app/services/git_operation_service.rb')
-rw-r--r--app/services/git_operation_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index 0d1bd05e552..5acfdb0f9e2 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -1,4 +1,3 @@
-
class GitOperationService
attr_reader :user, :repository
@@ -28,6 +27,9 @@ class GitOperationService
with_hooks(ref, newrev, oldrev) do |service|
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