Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Papa <fabtheman@gmail.com>2019-06-13 13:46:47 +0300
committerDouwe Maan <douwe@gitlab.com>2019-06-13 13:46:47 +0300
commit352b43e0af67377b8e75b4a082418e32b13ee5f6 (patch)
tree424cb0499d657602dd77aef0bdaad63d77ca41dc /app/services/git
parent4eb63d82d923bf884a1758536b2b8930bb9896b0 (diff)
Modify the branch hooks spec to expect processing of commit messages
Commit messages are not processed for references to issues when creating the default branch on push. This was expected behavior (probably to avoid performance problems when first pushing a repository with thousands of commits). However, this is not an issue because we always limit the number of commits to process to 100 regardless of whether we are creating the default branch or not.
Diffstat (limited to 'app/services/git')
-rw-r--r--app/services/git/branch_hooks_service.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/services/git/branch_hooks_service.rb b/app/services/git/branch_hooks_service.rb
index d21a6bb1b9a..4aee48f22e7 100644
--- a/app/services/git/branch_hooks_service.rb
+++ b/app/services/git/branch_hooks_service.rb
@@ -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?