Code

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 4fe3fc7b4494c37e05947736f0ae82d6feba5764..52ae2aa8613e7831c2ebff8f9f9d791d62cfc214 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);