You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
732B

  1. diff --git a/lib/grit/commit.rb b/lib/grit/commit.rb
  2. index a093bb1db8e884cccf396b297259181d1caebed4..80fd3d527f269ecbd570b65b8e21fd85baedb6e9 100644
  3. --- a/lib/grit/commit.rb
  4. +++ b/lib/grit/commit.rb
  5. @@ -156,12 +156,8 @@ module Grit
  6. def diffs
  7. if parents.empty?
  8. - diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
  9. - if diff =~ /diff --git a/
  10. - diff = diff.sub(/.+?(diff --git a)/m, '\1')
  11. - else
  12. - diff = ''
  13. - end
  14. + diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
  15. + diff = diff.sub(/.+?(diff --git a)/m, '\1')
  16. Diff.list_from_string(@repo, diff)
  17. else
  18. self.class.diff(@repo, parents.first.id, @id)