gitweb: Simplify 'opt' parameter validation, add "no merges" feeds
Simplify and make more readable validation of 'opt' (extra options)
parameter, using exists($hash{key}) instead of grepping keys of a hash
for value.
Move 'opt' parameter to be the last (for now) in the URL.
Make use of '--no-merges' extra option ('opt') by adding "no merges"
RSS and Atom feeds to the HTML header. Note that alternate format
links in the RSS and Atom views do not use '--no-merges' option yet!
Adds tests for the 'opt' parameter to t9500-gitweb-standalone-no-errors.sh
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
01ac1e38db
commit
12075103dd
@ -521,4 +521,32 @@ test_expect_success \
|
||||
'gitweb_run "p=.git;a=log"'
|
||||
test_debug 'cat gitweb.log'
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# extra options
|
||||
|
||||
test_expect_success \
|
||||
'opt: log --no-merges' \
|
||||
'gitweb_run "p=.git;a=log;opt=--no-merges"'
|
||||
test_debug 'cat gitweb.log'
|
||||
|
||||
test_expect_success \
|
||||
'opt: atom --no-merges' \
|
||||
'gitweb_run "p=.git;a=log;opt=--no-merges"'
|
||||
test_debug 'cat gitweb.log'
|
||||
|
||||
test_expect_success \
|
||||
'opt: "file" history --no-merges' \
|
||||
'gitweb_run "p=.git;a=history;f=file;opt=--no-merges"'
|
||||
test_debug 'cat gitweb.log'
|
||||
|
||||
test_expect_success \
|
||||
'opt: log --no-such-option (invalid option)' \
|
||||
'gitweb_run "p=.git;a=log;opt=--no-such-option"'
|
||||
test_debug 'cat gitweb.log'
|
||||
|
||||
test_expect_success \
|
||||
'opt: tree --no-merges (invalid option for action)' \
|
||||
'gitweb_run "p=.git;a=tree;opt=--no-merges"'
|
||||
test_debug 'cat gitweb.log'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user