Commit a781785
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>1 parent 16a7fcf commit a781785
1 file changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | 310 | | |
315 | 311 | | |
316 | 312 | | |
| |||
356 | 352 | | |
357 | 353 | | |
358 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
359 | 367 | | |
360 | 368 | | |
361 | 369 | | |
| |||
1299 | 1307 | | |
1300 | 1308 | | |
1301 | 1309 | | |
| 1310 | + | |
1302 | 1311 | | |
1303 | 1312 | | |
1304 | 1313 | | |
| 1314 | + | |
1305 | 1315 | | |
1306 | 1316 | | |
1307 | 1317 | | |
| |||
1313 | 1323 | | |
1314 | 1324 | | |
1315 | 1325 | | |
| 1326 | + | |
1316 | 1327 | | |
1317 | | - | |
| 1328 | + | |
| 1329 | + | |
1318 | 1330 | | |
1319 | 1331 | | |
1320 | 1332 | | |
| |||
4302 | 4314 | | |
4303 | 4315 | | |
4304 | 4316 | | |
| 4317 | + | |
4305 | 4318 | | |
4306 | 4319 | | |
4307 | 4320 | | |
4308 | | - | |
4309 | | - | |
| 4321 | + | |
| 4322 | + | |
4310 | 4323 | | |
4311 | 4324 | | |
4312 | 4325 | | |
| |||
0 commit comments