diff options
author | Jakub Narebski <jnareb@gmail.com> | 2007-12-15 15:41:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-16 11:56:26 -0800 |
commit | dfa7c7d221d05499063f9bf95f507af8a882bfeb (patch) | |
tree | 7fbc487c82969fec77000cd6d9c01548ca2daf54 /merge-file.c | |
parent | gitweb: disambiguate heads and tags withs the same name (diff) | |
download | tgif-dfa7c7d221d05499063f9bf95f507af8a882bfeb.tar.xz |
gitweb: Teach "a=blob" action to be more lenient about blob/file mime type
Since 930cf7dd7cc6b87d173f182230763e1f1913d319 'blob' action knows the
file type; if the file type is not "text/*" or one of common network
image formats/mimetypes (gif, png, jpeg) then the action "blob"
defaulted to "blob_plain". This caused the problem if mimetypes file
was not well suited for web, for example returning "application/x-sh"
for "*.sh" shell scripts, instead of "text/plain" (or other "text/*").
Now "blob" action defaults to "blob_plain" ('raw' view) only if file
is of type which is neither "text/*" nor "image/{gif,png,jpeg}"
AND it is binary file. Otherwise it assumes that it can be displayed
either in <img> tag ("image/*" mimetype), or can be displayed line by
line (otherwise).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-file.c')
0 files changed, 0 insertions, 0 deletions