]> Kevux Git Server - rit/commitdiff
gitweb: Skip comments in mime.types like file
authorJakub Narebski <jnareb@gmail.com>
Mon, 14 Aug 2006 00:15:22 +0000 (02:15 +0200)
committerJunio C Hamano <junkio@cox.net>
Tue, 15 Aug 2006 00:30:16 +0000 (17:30 -0700)
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index 4fe3fc7..52ae2aa 100755 (executable)
@@ -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);