Add a comment to explain why newrev should be updated
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_20301332
This commit is contained in:
parent
104bac3d21
commit
14c4db2ae4
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue