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
d6c2f238
Commit
d6c2f238
authored
Jun 13, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
a089e48c
0c4059ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
app/services/git/branch_hooks_service.rb
app/services/git/branch_hooks_service.rb
+1
-5
changelogs/unreleased/patch-issue--56683.yml
changelogs/unreleased/patch-issue--56683.yml
+6
-0
spec/services/git/branch_hooks_service_spec.rb
spec/services/git/branch_hooks_service_spec.rb
+2
-2
No files found.
app/services/git/branch_hooks_service.rb
View file @
d6c2f238
...
...
@@ -20,8 +20,7 @@ module Git
strong_memoize
(
:commits
)
do
if
creating_default_branch?
# The most recent PROCESS_COMMIT_LIMIT commits in the default branch
offset
=
[
count_commits_in_branch
-
PROCESS_COMMIT_LIMIT
,
0
].
max
project
.
repository
.
commits
(
params
[
:newrev
],
offset:
offset
,
limit:
PROCESS_COMMIT_LIMIT
)
project
.
repository
.
commits
(
params
[
:newrev
],
limit:
PROCESS_COMMIT_LIMIT
)
elsif
creating_branch?
# Use the pushed commits that aren't reachable by the default branch
# as a heuristic. This may include more commits than are actually
...
...
@@ -84,9 +83,6 @@ module Git
# Schedules processing of commit messages
def
enqueue_process_commit_messages
# don't process commits for the initial push to the default branch
return
if
creating_default_branch?
limited_commits
.
each
do
|
commit
|
next
unless
commit
.
matches_cross_reference_regex?
...
...
changelogs/unreleased/patch-issue--56683.yml
0 → 100644
View file @
d6c2f238
---
title
:
Process up to 100 commit messages for references when pushing to a new default
branch
merge_request
:
29511
author
:
Fabio Papa
type
:
fixed
spec/services/git/branch_hooks_service_spec.rb
View file @
d6c2f238
...
...
@@ -287,8 +287,8 @@ describe Git::BranchHooksService do
context
'creating the default branch'
do
let
(
:oldrev
)
{
Gitlab
::
Git
::
BLANK_SHA
}
it
'
does not process
commit messages'
do
expect
(
ProcessCommitWorker
).
not_to
receive
(
:perform_async
)
it
'
processes a limited number of
commit messages'
do
expect
(
ProcessCommitWorker
).
to
receive
(
:perform_async
).
once
service
.
execute
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