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
c0751b8c
Commit
c0751b8c
authored
Mar 18, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying fixes for old commits git hooks problem
parent
d69d4381
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+8
-2
No files found.
lib/gitlab/git_access.rb
View file @
c0751b8c
...
...
@@ -202,8 +202,10 @@ module Gitlab
return
build_status_object
(
true
)
end
blank_oldrev
=
Gitlab
::
Git
.
blank_ref?
(
oldrev
)
# if oldrev is blank, the branch was just created
oldrev
=
project
.
default_branch
if
Gitlab
::
Git
.
blank_ref?
(
oldrev
)
oldrev
=
project
.
default_branch
if
blank_oldrev
commits
=
if
oldrev
...
...
@@ -213,7 +215,7 @@ module Gitlab
end
commits
.
each
do
|
commit
|
next
if
commit_from_annex_sync?
(
commit
.
safe_message
)
next
if
commit_from_annex_sync?
(
commit
.
safe_message
)
||
(
blank_oldrev
&&
old_commit?
(
commit
))
if
status_object
=
check_commit
(
commit
,
git_hook
)
return
status_object
...
...
@@ -373,5 +375,9 @@ module Gitlab
# Commit message starting with <git-annex in > so avoid git hooks on this
commit_message
.
start_with?
(
'git-annex in'
)
end
def
old_commit?
(
commit
)
commit
.
refs
(
project
.
repository
).
any?
end
end
end
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