summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-03-09 12:52:45 +0100
committerHannes Rosenögger <123haynes@gmail.com>2015-03-09 12:52:45 +0100
commit224e104d8dc79e081fd897a1e52799dc1a0082bb (patch)
treeb891936184fd4fab1474b454ffd4b29c7759a907 /app/services
parent6b214a5d87e9a7a57b3da1b9605626e516f65d1a (diff)
downloadgitlab-ce-224e104d8dc79e081fd897a1e52799dc1a0082bb.tar.gz
fix mass SQL statements on initial push
This commit disables process_commit_messages() for the initial push to the default branch. This fixes the mass SQL statements (~500000) that were executed during the initial push of the linux kernel for example.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/git_push_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index 13def127763..4e1afea6d50 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -42,8 +42,10 @@ class GitPushService
# as a heuristic. This may include more commits than are actually pushed, but
# that shouldn't matter because we check for existing cross-references later.
@push_commits = project.repository.commits_between(project.default_branch, newrev)
+
+ # don't process commits for the initial push to the default branch
+ process_commit_messages(ref)
end
- process_commit_messages(ref)
elsif push_to_existing_branch?(ref, oldrev)
# Collect data for this git push
@push_commits = project.repository.commits_between(oldrev, newrev)