Implement Blob, Tree and Lazy, add tests for Tree.
[phpgit.git] / tests / fixtures / diff_2f
blob5246cd6b9ac9b25fd749000e3e2ca3c83e517703
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  
7      def diffs
8        if parents.empty?
9 -        diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
10 -        if diff =~ /diff --git a/
11 -          diff = diff.sub(/.+?(diff --git a)/m, '\1')
12 -        else
13 -          diff = ''
14 -        end
15 +        diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id) 
16 +        diff = diff.sub(/.+?(diff --git a)/m, '\1')
17          Diff.list_from_string(@repo, diff)
18        else
19          self.class.diff(@repo, parents.first.id, @id)