Rollback diff drop and set default commit id to HEAD

Signed-off-by: NDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
上级 3695ae18
......@@ -25,7 +25,7 @@ class Repository
raw_repository.empty?
end
def commit(id = nil)
def commit(id = 'HEAD')
return nil unless raw_repository
commit = Gitlab::Git::Commit.find(raw_repository, id)
commit = Commit.new(commit) if commit
......
......@@ -13,7 +13,7 @@ module Gitlab
lines_arr = ::Gitlab::InlineDiff.processing lines
lines_arr.drop(4).each do |line|
lines_arr.each do |line|
raw_line = line.dup
next if filename?(line)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册