7e3934804a
From Daniel Dickman. Thanks!
25 lines
953 B
Plaintext
25 lines
953 B
Plaintext
$OpenBSD: patch-gitweb_gitweb_perl,v 1.2 2008/02/08 17:56:01 bernd Exp $
|
|
|
|
This prevents the following error: '-T and -B not implemented on filehandles'
|
|
|
|
--- gitweb/gitweb.perl.orig Fri Feb 1 23:09:01 2008
|
|
+++ gitweb/gitweb.perl Sat Feb 2 19:33:24 2008
|
|
@@ -4245,7 +4245,7 @@ sub git_blob_plain {
|
|
}
|
|
|
|
my $type = shift;
|
|
- open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
|
|
+ open my $fd, "-|:raw:perlio", git_cmd(), "cat-file", "blob", $hash
|
|
or die_error(undef, "Couldn't cat $file_name, $hash");
|
|
|
|
$type ||= blob_mimetype($fd, $file_name);
|
|
@@ -4287,7 +4287,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(undef, "Couldn't cat $file_name, $hash");
|
|
my $mimetype = blob_mimetype($fd, $file_name);
|
|
if ($mimetype !~ m!^(?:text/|image/(?:gif|png|jpeg)$)! && -B $fd) {
|