From e37c39a21dac3d67c9c589894cf02f3614a04cbe Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Fri, 19 Aug 2016 13:07:39 +0100 Subject: 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. --- app/workers/emails_on_push_worker.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/workers') 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 -- cgit v1.2.1