aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-08-14 02:15:22 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-14 17:30:16 -0700
commit618918e5411e2e769ad5e8d44c5d1cc363b983b5 (patch)
tree47227a2ca776a0914bf144429f2bd66353fc7144
parentd294e1cad4eef263c7f4912332fd0094e37e95a7 (diff)
downloadgit-618918e5411e2e769ad5e8d44c5d1cc363b983b5.tar.gz
git-618918e5411e2e769ad5e8d44c5d1cc363b983b5.tar.xz
gitweb: Skip comments in mime.types like file
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgitweb/gitweb.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4fe3fc7b4..52ae2aa86 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -858,6 +858,7 @@ sub mimetype_guess_file {
my %mimemap;
open(MIME, $mimemap) or return undef;
while (<MIME>) {
+ next if m/^#/; # skip comments
my ($mime, $exts) = split(/\t+/);
if (defined $exts) {
my @exts = split(/\s+/, $exts);