9746e8c68f
ok sthen@, pascal@, benoit@ (maintainer)
25 lines
955 B
Plaintext
25 lines
955 B
Plaintext
$OpenBSD: patch-gitweb_gitweb_perl,v 1.22 2013/01/25 08:14:59 dcoppa Exp $
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
--- gitweb/gitweb.perl.orig Mon Jan 14 20:22:04 2013
|
|
+++ gitweb/gitweb.perl Wed Jan 23 14:53:15 2013
|
|
@@ -6902,7 +6902,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)
|
|
@@ -6964,7 +6964,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
|