summaryrefslogtreecommitdiff
path: root/app/workers/emails_on_push_worker.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-07-21 10:53:38 +0100
committerSean McGivern <sean@gitlab.com>2016-07-21 10:53:38 +0100
commit331571e0671baf606fd0c5cf694441b9a4036419 (patch)
treec6a91d2c62dc93cb9d5c178e0db89bfc00b529c4 /app/workers/emails_on_push_worker.rb
parentcb9f418bf846b5bc32902ed70ddc7d7be3d5c071 (diff)
downloadgitlab-ce-20061-emailsonpushworker-fails-on-new-branch-pushes.tar.gz
Fix emails on push for new and deleted branches20061-emailsonpushworker-fails-on-new-branch-pushes
Diffstat (limited to 'app/workers/emails_on_push_worker.rb')
-rw-r--r--app/workers/emails_on_push_worker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb
index 8551288e2f2..0b6a01a3200 100644
--- a/app/workers/emails_on_push_worker.rb
+++ b/app/workers/emails_on_push_worker.rb
@@ -28,12 +28,12 @@ class EmailsOnPushWorker
:push
end
- merge_base_sha = project.merge_base_commit(before_sha, after_sha).try(:sha)
-
diff_refs = nil
compare = nil
reverse_compare = false
+
if action == :push
+ merge_base_sha = project.merge_base_commit(before_sha, after_sha).try(:sha)
compare = Gitlab::Git::Compare.new(project.repository.raw_repository, before_sha, after_sha)
diff_refs = Gitlab::Diff::DiffRefs.new(