Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fe51fa26
Commit
fe51fa26
authored
Jun 15, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont set checkout sha for removed branch/tag
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
cbba28bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lib/gitlab/push_data_builder.rb
lib/gitlab/push_data_builder.rb
+5
-2
No files found.
lib/gitlab/push_data_builder.rb
View file @
fe51fa26
...
...
@@ -27,7 +27,7 @@ module Gitlab
# Get latest 20 commits ASC
commits_limited
=
commits
.
last
(
20
)
# For performance purposes maximum 20 latest commits
# will be passed as post receive hook data.
commit_attrs
=
commits_limited
.
map
(
&
:hook_attrs
)
...
...
@@ -70,8 +70,11 @@ module Gitlab
end
def
checkout_sha
(
repository
,
newrev
,
ref
)
# Checkout sha is nil when we remove branch or tag
return
if
Gitlab
::
Git
.
blank_ref?
(
newrev
)
# Find sha for tag, except when it was deleted.
if
Gitlab
::
Git
.
tag_ref?
(
ref
)
&&
!
Gitlab
::
Git
.
blank_ref?
(
newrev
)
if
Gitlab
::
Git
.
tag_ref?
(
ref
)
tag_name
=
Gitlab
::
Git
.
ref_name
(
ref
)
tag
=
repository
.
find_tag
(
tag_name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment