Fix bugs with commitdiff
Tomas Doran [Tue, 3 Nov 2009 00:16:22 +0000 (00:16 +0000)]
Makefile.PL
lib/Gitalist/Model/Git.pm

index a57d407..d760315 100644 (file)
@@ -26,7 +26,7 @@ requires 'IO::Capture::Stdout';
 requires 'File::Which';
 requires 'CGI';
 requires 'DateTime';
-requires 'Git::PurePerl';
+requires 'Git::PurePerl'; # Note - need the git version in broquaint's fork
 requires 'List::MoreUtils';
 requires 'MooseX::Declare';
 requires 'Path::Class' => '0.17';
index e62c72a..1231ba0 100644 (file)
@@ -382,7 +382,7 @@ Return the contents of a given file.
 sub cat_file {
   my ($self, $object) = @_;
 
-  my $type = $self->get_object_type($object, $project);
+  my $type = $self->get_object_type($object, $self->project);
   die "object `$object' is not a file\n"
     if (!defined $type || $type ne 'blob');
 
@@ -484,7 +484,7 @@ sub diff {
   # only one, otherwise it was a merge commit.
   my $parent = $args{parent}
              ? $args{parent}
-             : @{$args{commit}->parents} <= 1
+             : $args{commit}->parents <= 1
                ? $args{commit}->parent_sha1
                : '-c';
   my @etc = (