Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Commits
ecac2f11
Commit
ecac2f11
authored
8 years ago
by
Lin Jen-Shin
Browse files
Options
Downloads
Patches
Plain Diff
Update the comment:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_20876648
parent
c1a75c3c
No related branches found
No related tags found
1 merge request
!7237
Don't execute git hooks if you create branch as part of other change
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/services/git_operation_service.rb
+5
-3
5 additions, 3 deletions
app/services/git_operation_service.rb
with
5 additions
and
3 deletions
app/services/git_operation_service.rb
+
5
−
3
View file @
ecac2f11
...
...
@@ -26,10 +26,12 @@ def add_tag(tag_name, newrev, options = {})
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment