Stop Project->diff() blowing up when no parent is specified, and commit
Zachary Stevens [Tue, 10 Nov 2009 01:32:04 +0000 (01:32 +0000)]
is a merge commit.

lib/Gitalist/Git/Project.pm

index bfb92fa..7f25e9c 100644 (file)
@@ -301,7 +301,8 @@ The keys for each item will be:
 
         my @out = $self->raw_diff(
             ( $patch ? '--patch-with-raw' : () ),
-            $parent, $commit->sha1, @etc,
+            ( $parent ? $parent : () ),
+            $commit->sha1, @etc,
         );
 
         # XXX Yes, there is much wrongness having parse_diff_tree be destructive.