]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Skip comments in mime.types like file
authorJakub Narebski <redacted>
Mon, 14 Aug 2006 00:15:22 +0000 (02:15 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:05:47 +0000 (00:05 -0400)
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 5a94c621a2db21155da69c106d9ac9535eac284feded1986dc9917b6db6a594a..02b7c921a801c520204ba80699aacff89e2ecaac5cd2329fa17fea3b10c6b338 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);
This page took 0.255196 seconds and 4 git commands to generate.