2010-04-02 12:08:09 -04:00
|
|
|
$OpenBSD: patch-gitweb_gitweb_perl,v 1.15 2010/04/02 16:08:09 bernd Exp $
|
2007-12-17 15:00:05 -05:00
|
|
|
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
|
2010-04-02 12:08:09 -04:00
|
|
|
--- 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 {
|
2008-06-24 16:28:00 -04:00
|
|
|
$expires = "+1d";
|
2007-12-17 15:00:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
- open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
|
|
|
|
+ open my $fd, "-|:raw:perlio", git_cmd(), "cat-file", "blob", $hash
|
2008-09-27 17:47:20 -04:00
|
|
|
or die_error(500, "Open git-cat-file blob '$hash' failed");
|
2007-12-17 15:00:05 -05:00
|
|
|
|
2008-06-24 16:28:00 -04:00
|
|
|
# content-type (can include charset)
|
2010-04-02 12:08:09 -04:00
|
|
|
@@ -5336,7 +5336,7 @@ sub git_blob {
|
2007-12-17 15:00:05 -05:00
|
|
|
}
|
|
|
|
|
2009-01-24 09:31:28 -05:00
|
|
|
my $have_blame = gitweb_check_feature('blame');
|
2007-12-17 15:00:05 -05:00
|
|
|
- open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
|
|
|
|
+ open my $fd, "-|:raw:perlio", git_cmd(), "cat-file", "blob", $hash
|
2008-09-27 17:47:20 -04:00
|
|
|
or die_error(500, "Couldn't cat $file_name, $hash");
|
2007-12-17 15:00:05 -05:00
|
|
|
my $mimetype = blob_mimetype($fd, $file_name);
|
2008-02-08 12:56:00 -05:00
|
|
|
if ($mimetype !~ m!^(?:text/|image/(?:gif|png|jpeg)$)! && -B $fd) {
|