Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-08-19 21:16:55 +0300
committerRuben Davila <rdavila84@gmail.com>2016-08-19 23:23:28 +0300
commit670dd32ac96279a733d5af98ca0f528423cfafce (patch)
treedccf089449e9a8c42ee40bc6cc0b7d4fafe71810 /app
parenta92ab4973bc8177c7964156d462d3e99bc40ee1b (diff)
Merge branch '21010-emailsonpushworker-incorrectly-claims-deleted-a-commit-after-a-push' into 'master'
Resolve "EmailsOnPushWorker incorrectly claims deleted a commit after a push" ## What does this MR do? Fix the comparison order in the emails on push worker, so regular pushes don't show a message about force pushing. ## Are there points in the code the reviewer needs to double check? Don't think so, it was just a typo: `after_sha` should map to the `source_branch` argument, because it's the head of the comparison. ## Why was this MR needed? To fix a regression! ## What are the relevant issue numbers? Closes #21010. ## Does this MR meet the acceptance criteria? - [x] ~~[CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ - [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [x] ~~API support added~~ - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5894
Diffstat (limited to 'app')
-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