summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2008-12-08 13:13:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-12-08 17:04:36 (GMT)
commit4586864afee675eb1c617666f806664aef04a02a (patch)
tree1883d8011feab16521e1f3d3280b13eef7764abe /gitweb/gitweb.perl
parente10ea8126c27b079e81932ca487747b4961d0604 (diff)
downloadgit-4586864afee675eb1c617666f806664aef04a02a.zip
git-4586864afee675eb1c617666f806664aef04a02a.tar.gz
git-4586864afee675eb1c617666f806664aef04a02a.tar.bz2
gitweb: Fix bug in insert_file() subroutine
In insert_file() subroutine (which is used to insert HTML fragments as custom header, footer, hometext (for projects list view), and per project README.html (for summary view)) we used: map(to_utf8, <$fd>); This doesn't work, and other form has to be used: map { to_utf8($_) } <$fd>; Now with test for t9600 added, for $GIT_DIR/README.html. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9517392..6eb370d 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2764,7 +2764,7 @@ sub insert_file {
my $filename = shift;
open my $fd, '<', $filename;
- print map(to_utf8, <$fd>);
+ print map { to_utf8($_) } <$fd>;
close $fd;
}