bee120fd75
Based on a diff by Daniel Dickman. Thanks!
25 lines
951 B
Plaintext
25 lines
951 B
Plaintext
$OpenBSD: patch-gitweb_gitweb_perl,v 1.15 2010/04/02 16:08:09 bernd Exp $
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
--- gitweb/gitweb.perl.orig Thu Apr 1 06:29:23 2010
|
|
+++ gitweb/gitweb.perl Fri Apr 2 11:36:32 2010
|
|
@@ -5283,7 +5283,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)
|
|
@@ -5336,7 +5336,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) {
|