diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-09-29 14:04:50 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-12 16:32:57 +0300 |
commit | ac4db38094f4a68a81b0a7570c5835f663c01cfd (patch) | |
tree | 32d138231d031d563810391f9707027657cb94ad /app/services/compare_service.rb | |
parent | c143003bfbd5cda725451c38ff1eca8ba469409b (diff) | |
download | gitlab-ce-ac4db38094f4a68a81b0a7570c5835f663c01cfd.tar.gz |
Use straight diff approach when compare merge request versions
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services/compare_service.rb')
-rw-r--r-- | app/services/compare_service.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/compare_service.rb b/app/services/compare_service.rb index 6d6075628af..6df3b958b8a 100644 --- a/app/services/compare_service.rb +++ b/app/services/compare_service.rb @@ -3,7 +3,7 @@ require 'securerandom' # Compare 2 branches for one repo or between repositories # and return Gitlab::Git::Compare object that responds to commits and diffs class CompareService - def execute(source_project, source_branch, target_project, target_branch) + def execute(source_project, source_branch, target_project, target_branch, straight = false) source_commit = source_project.commit(source_branch) return unless source_commit @@ -23,9 +23,10 @@ class CompareService raw_compare = Gitlab::Git::Compare.new( target_project.repository.raw_repository, target_branch, - source_sha + source_sha, + straight ) - Compare.new(raw_compare, target_project) + Compare.new(raw_compare, target_project, straight) end end |