зеркало из https://github.com/github/grit.git
add merge commit diff support
This commit is contained in:
Родитель
1911fe1459
Коммит
5251fd61f6
|
@ -162,7 +162,12 @@ module Grit
|
|||
end
|
||||
|
||||
def show
|
||||
diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
|
||||
if parents.size > 1
|
||||
diff = @repo.git.native("diff #{parents[0].id}..#{parents[1].id}", {:full_index => true})
|
||||
else
|
||||
diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
|
||||
end
|
||||
|
||||
if diff =~ /diff --git a/
|
||||
diff = diff.sub(/.+?(diff --git a)/m, '\1')
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче