25 lines
952 B
Plaintext
25 lines
952 B
Plaintext
$OpenBSD: patch-gitweb_gitweb_perl,v 1.7 2008/12/09 09:53:33 bernd Exp $
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
--- gitweb/gitweb.perl.orig Mon Dec 8 02:21:49 2008
|
|
+++ gitweb/gitweb.perl Mon Dec 8 11:16:25 2008
|
|
@@ -4299,7 +4299,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)
|
|
@@ -4342,7 +4342,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);
|
|
if ($mimetype !~ m!^(?:text/|image/(?:gif|png|jpeg)$)! && -B $fd) {
|