diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-07-13 14:31:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-13 14:31:36 -0700 |
commit | d4c8c55fab116a22284696143f434574c32ee7e4 (patch) | |
tree | 75c8d29af3ead65dfbef2c462535f7f285bde412 /gitweb/gitweb.perl | |
parent | Merge branch 'jc/no-gitweb-test-without-cgi-etc' (diff) | |
parent | gitweb: allow space as delimiter in mime.types (diff) | |
download | tgif-d4c8c55fab116a22284696143f434574c32ee7e4.tar.xz |
Merge branch 'ln/gitweb-mime-types-split-at-blank'
* ln/gitweb-mime-types-split-at-blank:
gitweb: allow space as delimiter in mime.types
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 81dacf2b6a..ecc9d3cca3 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3562,12 +3562,9 @@ sub mimetype_guess_file { open(my $mh, '<', $mimemap) or return undef; while (<$mh>) { next if m/^#/; # skip comments - my ($mimetype, $exts) = split(/\t+/); - if (defined $exts) { - my @exts = split(/\s+/, $exts); - foreach my $ext (@exts) { - $mimemap{$ext} = $mimetype; - } + my ($mimetype, @exts) = split(/\s+/); + foreach my $ext (@exts) { + $mimemap{$ext} = $mimetype; } } close($mh); |