diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-12 13:27:59 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-12 16:32:57 +0300 |
commit | b48c4b2662e7db9d68052392fb34dd2b27d12cf5 (patch) | |
tree | 7a2c3aa891ed8f8de411c85f3d00d2a82726384b /app/models/merge_request_diff.rb | |
parent | 7421c08ace8a129b37c4942eb21a0b5cf1a73a53 (diff) |
Refactor straight compare diff code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/merge_request_diff.rb')
-rw-r--r-- | app/models/merge_request_diff.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index 6ad2201573d..b8a10b7968e 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -167,11 +167,11 @@ class MergeRequestDiff < ActiveRecord::Base self == merge_request.merge_request_diff end - def compare_with(sha, straight = true) + def compare_with(sha, straight: true) # When compare merge request versions we want diff A..B instead of A...B # so we handle cases when user does squash and rebase of the commits between versions. # For this reason we set straight to true by default. - CompareService.new.execute(project, head_commit_sha, project, sha, straight) + CompareService.new.execute(project, head_commit_sha, project, sha, straight: straight) end private |