diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-01-04 22:31:06 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-01-04 22:31:06 +0800 |
commit | 14c4db2ae4efa1187476f11569df1b77c9c055fa (patch) | |
tree | b0cf16353ffeb6a1b2d32f94aa856a1795e951ff /app | |
parent | 104bac3d215383b76b058e8f61b90fdfac936341 (diff) | |
download | gitlab-ce-14c4db2ae4efa1187476f11569df1b77c9c055fa.tar.gz |
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')
-rw-r--r-- | app/services/git_operation_service.rb | 4 |
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 |