X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/aa9bf2a5e50181a0fa3724fdaefdafeaa5756b12818391bd53692119bc80e2e1..f788ced94fa628a3b48bee2f65f1d172ec13ba2b210d4ca87ce85ac00e6c05b1:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 4c1e54d..71068dd 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -3223,14 +3223,12 @@ sub git_commit { if (!defined $parent) { $parent = "--root"; } - open my $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts, $parent, $hash + open my $fd, "-|", git_cmd(), "diff-tree", '-r', "--no-commit-id", + @diff_opts, $parent, $hash or die_error(undef, "Open git-diff-tree failed"); my @difftree = map { chomp; $_ } <$fd>; close $fd or die_error(undef, "Reading git-diff-tree failed"); - # filter out commit ID output - @difftree = grep(!/^[0-9a-fA-F]{40}$/, @difftree); - # non-textual hash id's can be cached my $expires; if ($hash =~ m/^[0-9a-fA-F]{40}$/) { @@ -3501,15 +3499,14 @@ sub git_commitdiff { my @difftree; if ($format eq 'html') { open $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts, + "--no-commit-id", "--patch-with-raw", "--full-index", $hash_parent, $hash or die_error(undef, "Open git-diff-tree failed"); while (chomp(my $line = <$fd>)) { # empty line ends raw part of diff-tree output last unless $line; - # filter out commit ID output - push @difftree, $line - unless $line =~ m/^[0-9a-fA-F]{40}$/; + push @difftree, $line; } } elsif ($format eq 'plain') {