summaryrefslogtreecommitdiff
path: root/app/helpers/diff_helper.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-11-17 13:10:01 +0100
committerDouwe Maan <douwe@gitlab.com>2015-11-17 13:10:01 +0100
commit24cf6865d3c0d47615a814c091cdb40bf513307e (patch)
treec41c76fd548ba15fed550a3cb86e207963f6feea /app/helpers/diff_helper.rb
parent264dc3f7dd15f2abb6ec90fe72ed88f4cdda6f58 (diff)
downloadgitlab-ce-24cf6865d3c0d47615a814c091cdb40bf513307e.tar.gz
Correctly set comparison first commit when range includes a merge commitcompare-first-commit
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r--app/helpers/diff_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
index b889fb28973..f7bf2a66eb5 100644
--- a/app/helpers/diff_helper.rb
+++ b/app/helpers/diff_helper.rb
@@ -171,7 +171,7 @@ module DiffHelper
def commit_for_diff(diff)
if diff.deleted_file
first_commit = @first_commit || @commit
- first_commit.parent
+ first_commit.parent || @first_commit
else
@commit
end