summaryrefslogtreecommitdiff
path: root/app/services/git_push_service.rb
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-22 03:26:58 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-05-04 20:03:46 +0100
commit020295fffc2329b7852c2739082986fd6b569d9e (patch)
treeff5c16475b3e30a6003d8d39f03484fb937e9e6f /app/services/git_push_service.rb
parent8e156d662b7895ce8777f34882422c3714cc65c7 (diff)
downloadgitlab-ce-020295fffc2329b7852c2739082986fd6b569d9e.tar.gz
Use regex to skip unnecessary reference processing in ProcessCommitWorker
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r--app/services/git_push_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index 45411c779cc..b8bd7720265 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -85,8 +85,10 @@ class GitPushService < BaseService
default = is_default_branch?
push_commits.last(PROCESS_COMMIT_LIMIT).each do |commit|
- ProcessCommitWorker.
- perform_async(project.id, current_user.id, commit.to_hash, default)
+ if commit.matches_cross_reference_regex?
+ ProcessCommitWorker.
+ perform_async(project.id, current_user.id, commit.to_hash, default)
+ end
end
end