diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-12-08 17:57:52 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-12-08 17:57:52 +0800 |
commit | 8384d0d8d528ffdd60c9ba9e3c0c9f688cb560ef (patch) | |
tree | fb84cc230333c82d64b248f4fa83a0d5b8d49c24 /app/workers | |
parent | 23032467d4a1282f69e76bba921bd71c0083f7a8 (diff) | |
download | gitlab-ce-8384d0d8d528ffdd60c9ba9e3c0c9f688cb560ef.tar.gz |
Introduce Repository#with_tmp_ref which we need
commits from the other repository. We'll cleanup
the tmp ref after we're done with our business.
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/emails_on_push_worker.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb index b9cd49985dc..d4c3f14ec06 100644 --- a/app/workers/emails_on_push_worker.rb +++ b/app/workers/emails_on_push_worker.rb @@ -33,13 +33,15 @@ class EmailsOnPushWorker reverse_compare = false if action == :push - compare = CompareService.new.execute(project, after_sha, project, before_sha) + compare = CompareService.new(project, after_sha). + execute(project, before_sha) diff_refs = compare.diff_refs return false if compare.same if compare.commits.empty? - compare = CompareService.new.execute(project, before_sha, project, after_sha) + compare = CompareService.new(project, before_sha). + execute(project, after_sha) diff_refs = compare.diff_refs reverse_compare = true |