summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-19 13:07:39 +0100
committerSean McGivern <sean@gitlab.com>2016-08-19 13:07:39 +0100
commite37c39a21dac3d67c9c589894cf02f3614a04cbe (patch)
tree505ee4d9d4396ba5fc4d5781689f1d3d01633dd7 /app/workers
parent12fe6a6fd733110acc72aa0f5bdaec2b1fa1f358 (diff)
downloadgitlab-ce-e37c39a21dac3d67c9c589894cf02f3614a04cbe.tar.gz
Fix force-push message in push emails
`after_sha` maps to the source branch, as it's the head of our compare, so these were just the wrong way around.
Diffstat (limited to 'app/workers')
-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 c6a5af2809a..1dc7e0adef7 100644
--- a/app/workers/emails_on_push_worker.rb
+++ b/app/workers/emails_on_push_worker.rb
@@ -33,13 +33,13 @@ class EmailsOnPushWorker
reverse_compare = false
if action == :push
- compare = CompareService.new.execute(project, before_sha, project, after_sha)
+ compare = CompareService.new.execute(project, after_sha, project, before_sha)
diff_refs = compare.diff_refs
return false if compare.same
if compare.commits.empty?
- compare = CompareService.new.execute(project, after_sha, project, before_sha)
+ compare = CompareService.new.execute(project, before_sha, project, after_sha)
diff_refs = compare.diff_refs
reverse_compare = true