diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-19 15:05:47 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-19 16:35:44 +0100 |
commit | 4a4c1765be20f0f0c6eca5c66513cb51a8b08fcf (patch) | |
tree | d16ecde63ed11e4c1e6904886ee3661babd1132e /app/models/commit.rb | |
parent | 12e9df327042f3b368878d14f6e18e51b9f668b9 (diff) | |
download | gitlab-ce-4a4c1765be20f0f0c6eca5c66513cb51a8b08fcf.tar.gz |
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.
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |