diff options
author | Sean McGivern <sean@gitlab.com> | 2016-07-21 10:53:38 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-07-21 10:53:38 +0100 |
commit | 331571e0671baf606fd0c5cf694441b9a4036419 (patch) | |
tree | c6a91d2c62dc93cb9d5c178e0db89bfc00b529c4 /app | |
parent | cb9f418bf846b5bc32902ed70ddc7d7be3d5c071 (diff) | |
download | gitlab-ce-331571e0671baf606fd0c5cf694441b9a4036419.tar.gz |
Fix emails on push for new and deleted branches20061-emailsonpushworker-fails-on-new-branch-pushes
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/emails_on_push_worker.rb | 4 |
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( |