openbsd-ports/devel/git/patches/patch-gitweb_gitweb_perl

25 lines
952 B
Plaintext
Raw Normal View History

$OpenBSD: patch-gitweb_gitweb_perl,v 1.5 2008/09/27 21:47:20 bernd Exp $
2007-12-17 20:00:05 +00:00
This prevents the following error: '-T and -B not implemented on filehandles'
--- gitweb/gitweb.perl.orig Mon Aug 25 09:34:18 2008
+++ gitweb/gitweb.perl Mon Aug 25 09:35:15 2008
@@ -4291,7 +4291,7 @@ sub git_blob_plain {
$expires = "+1d";
2007-12-17 20:00:05 +00:00
}
- 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");
2007-12-17 20:00:05 +00:00
# content-type (can include charset)
@@ -4334,7 +4334,7 @@ sub git_blob {
2007-12-17 20:00:05 +00:00
}
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");
2007-12-17 20:00:05 +00:00
my $mimetype = blob_mimetype($fd, $file_name);
if ($mimetype !~ m!^(?:text/|image/(?:gif|png|jpeg)$)! && -B $fd) {