diff options
author | Jakub Narebski <jnareb@gmail.com> | 2007-07-22 23:41:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-22 16:35:50 -0700 |
commit | a781785d8f1eb7adf05a24b121104716a086a67a (patch) | |
tree | b363e2ba8958db83fb89734bc5f5c3537135410b /builtin-mailinfo.c | |
parent | 16a7fcfe5e568b50ddebe2369600e71da67d1405 (diff) | |
download | git-a781785d8f1eb7adf05a24b121104716a086a67a.tar.gz |
gitweb: Fix support for legacy gitweb config for snapshots
Earlier commit which cleaned up snapshot support and introduced
support for multiple snapshot formats changed the format of
$feature{'snapshot'}{'default'} (gitweb configuration) and
gitweb.snapshot configuration variable (repository configuration).
It supported old gitweb.snapshot values of 'gzip', 'bzip2' and 'zip'
and tried to support, but failed to do that, old values of
$feature{'snapshot'}{'default'}; at least those corresponding to
old gitweb.snapshot values of 'gzip', 'bzip2' and 'zip', i.e.
['x-gzip', 'gz', 'gzip']
['x-bzip2', 'bz2', 'bzip2']
['x-zip', 'zip', '']
This commit moves legacy configuration support out of feature_snapshot
subroutine to separate filter_snapshot_fmts subroutine. The
filter_snapshot_fmts is used on result on result of
gitweb_check_feature('snapshot'). This way feature_snapshot deals
_only_ with repository config.
As a byproduct you can now use 'gzip' and 'bzip2' as aliases to 'tgz'
and 'tbz2' also in $feature{'snapshot'}{'default'}, not only in
gitweb.snapshot.
While at it do some whitespace cleanup: use tabs for indent, but
spaces for align.
Noticed-by: Matt McCutchen <hashproduct@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Tested-by: Matt McCutchen <hashproduct@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-mailinfo.c')
0 files changed, 0 insertions, 0 deletions