openbsd-ports/devel/git/patches/patch-gitweb_gitweb_perl
kn c9d9f92ab2 Update git to 2.22.0
https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.22.0.txt

Fixes, polishing, rewrites under the hood, nothing breaking.

OK benoit
2019-06-26 15:07:57 +00:00

26 lines
931 B
Plaintext

$OpenBSD: patch-gitweb_gitweb_perl,v 1.33 2019/06/26 15:07:57 kn Exp $
This prevents the following error: '-T and -B not implemented on filehandles'
Index: gitweb/gitweb.perl
--- gitweb/gitweb.perl.pat.orig
+++ gitweb/gitweb.perl
@@ -7038,7 +7038,7 @@ sub git_blob_plain {
$expires = "+1d";
}
- open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
+ open my $fd, "-|:raw:perlio", git_cmd(), "cat-file", "blob", $hash
or die_error(500, "Open git-cat-file blob '$hash' failed");
# content-type (can include charset)
@@ -7100,7 +7100,7 @@ sub git_blob {
}
my $have_blame = gitweb_check_feature('blame');
- open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
+ open my $fd, "-|:raw:perlio", git_cmd(), "cat-file", "blob", $hash
or die_error(500, "Couldn't cat $file_name, $hash");
my $mimetype = blob_mimetype($fd, $file_name);
# use 'blob_plain' (aka 'raw') view for files that cannot be displayed