- open my $fd, "-|", "$gitbin/diff-tree", "-r", $parent, $hash;
+ my $parent = "";
+ open my $fd, "-|", "$gitbin/cat-file", "commit", $hash;
+ while (my $line = <$fd>) {
+ chomp($line);
+ last if $line eq "";
+ if ($line =~ m/^parent (.*)$/ && $parent eq "") {
+ $parent = $1;
+ }
+ }
+ my $shortlog = <$fd>;
+ $shortlog = escapeHTML($shortlog);
+ close $fd;
+
+ open $fd, "-|", "$gitbin/diff-tree", "-r", $parent, $hash;