summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-19 15:05:47 +0100
committerSean McGivern <sean@gitlab.com>2016-08-19 15:05:47 +0100
commit91336f399bdd716aece8bcd8d28fdd354f86695b (patch)
treeb8e3d21ea677a39a098c303a17aeb86f9ebc5c55 /app
parent12e9df327042f3b368878d14f6e18e51b9f668b9 (diff)
downloadgitlab-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.rb2
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