From 4a4c1765be20f0f0c6eca5c66513cb51a8b08fcf Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Fri, 19 Aug 2016 15:05:47 +0100 Subject: Fix line commenting for the initial commit The initial commit doesn't have a parent, so explicitly pass the blank SHA and handle that when calculating the position. --- app/models/commit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index cc413448ce8..817d063e4a2 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -229,7 +229,7 @@ class Commit def diff_refs Gitlab::Diff::DiffRefs.new( - base_sha: self.parent_id || self.sha, + base_sha: self.parent_id || Gitlab::Git::BLANK_SHA, head_sha: self.sha ) end -- cgit v1.2.1