25 lines
950 B
Plaintext
25 lines
950 B
Plaintext
$OpenBSD: patch-gitweb_gitweb_perl,v 1.9 2009/01/29 23:16:35 bernd Exp $
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
--- gitweb/gitweb.perl.orig Mon Jan 26 01:48:26 2009
|
|
+++ gitweb/gitweb.perl Mon Jan 26 16:24:54 2009
|
|
@@ -4725,7 +4725,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)
|
|
@@ -4768,7 +4768,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) {
|