Rollback diff drop and set default commit id to HEAD

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-09-25 12:46:30 +03:00
parent 3695ae185b
commit b13c1469a3
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)