diff options
| author | Sean McGivern <sean@gitlab.com> | 2016-08-19 15:05:47 +0100 |
|---|---|---|
| committer | Sean McGivern <sean@gitlab.com> | 2016-08-19 15:05:47 +0100 |
| commit | 91336f399bdd716aece8bcd8d28fdd354f86695b (patch) | |
| tree | b8e3d21ea677a39a098c303a17aeb86f9ebc5c55 /app | |
| parent | 12e9df327042f3b368878d14f6e18e51b9f668b9 (diff) | |
| download | gitlab-ce-20895-inline-comments-for-first-commit.tar.gz | |
Fix line commenting for the initial commit20895-inline-comments-for-first-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')
| -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 |
