Use stored start and head for MR diff without whitespace

This commit is contained in:
Douwe Maan 2016-07-04 13:11:33 -04:00
parent 0a5e387284
commit d9c75aec3a

View file

@ -40,8 +40,8 @@ class MergeRequestDiff < ActiveRecord::Base
@diffs_no_whitespace ||= begin
compare = Gitlab::Git::Compare.new(
self.repository.raw_repository,
self.target_branch_sha,
self.source_branch_sha,
self.start_commit_sha || self.target_branch_sha,
self.head_commit_sha || self.source_branch_sha,
)
compare.diffs(options)
end