openbsd-ports/devel/git/patches/patch-gitweb_gitweb_perl
bernd 36855fe6b9 Maintenance update to git-1.6.0.3.
(otto@ asked for a commit from p2k8)
2008-10-24 09:17:34 +00:00

25 lines
952 B
Plaintext

$OpenBSD: patch-gitweb_gitweb_perl,v 1.6 2008/10/24 09:17:34 bernd Exp $
This prevents the following error: '-T and -B not implemented on filehandles'
--- gitweb/gitweb.perl.orig Wed Oct 22 06:19:18 2008
+++ gitweb/gitweb.perl Wed Oct 22 08:12:23 2008
@@ -4298,7 +4298,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)
@@ -4341,7 +4341,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) {