$OpenBSD: patch-gitweb_gitweb_perl,v 1.16 2010/06/20 11:49:41 bernd Exp $

This prevents the following error: '-T and -B not implemented on filehandles'

--- gitweb/gitweb.perl.orig	Sat Apr 24 04:38:35 2010
+++ gitweb/gitweb.perl	Mon Apr 26 10:22:14 2010
@@ -5290,7 +5290,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)
@@ -5343,7 +5343,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) {
