зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
d294e1cad4
Коммит
618918e541
|
@ -858,6 +858,7 @@ sub mimetype_guess_file {
|
||||||
my %mimemap;
|
my %mimemap;
|
||||||
open(MIME, $mimemap) or return undef;
|
open(MIME, $mimemap) or return undef;
|
||||||
while (<MIME>) {
|
while (<MIME>) {
|
||||||
|
next if m/^#/; # skip comments
|
||||||
my ($mime, $exts) = split(/\t+/);
|
my ($mime, $exts) = split(/\t+/);
|
||||||
if (defined $exts) {
|
if (defined $exts) {
|
||||||
my @exts = split(/\s+/, $exts);
|
my @exts = split(/\s+/, $exts);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче