25 lines
955 B
Plaintext
25 lines
955 B
Plaintext
$OpenBSD: patch-gitweb_gitweb_perl,v 1.28 2016/12/04 15:29:46 dcoppa Exp $
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
--- gitweb/gitweb.perl.orig Tue Nov 29 22:06:51 2016
|
|
+++ gitweb/gitweb.perl Fri Dec 2 16:09:37 2016
|
|
@@ -7003,7 +7003,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)
|
|
@@ -7065,7 +7065,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
|