$OpenBSD: patch-gitweb_gitweb_perl,v 1.18 2011/04/29 11:09:12 stsp Exp $ This prevents the following error: '-T and -B not implemented on filehandles' --- gitweb/gitweb.perl.orig Sun Apr 24 19:48:31 2011 +++ gitweb/gitweb.perl Thu Apr 28 17:43:42 2011 @@ -5841,7 +5841,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) @@ -5894,7 +5894,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); # use 'blob_plain' (aka 'raw') view for files that cannot be displayed