mirror of
https://github.com/git/git.git
synced 2026-08-03 06:31:08 +00:00
Merge branch 'ph/parseopt'
* ph/parseopt: parse-options: new option type to treat an option-like parameter as an argument. parse-opt: bring PARSE_OPT_HIDDEN and NONEG to git-rev-parse --parseopt
This commit is contained in:
@@ -21,6 +21,9 @@ string options
|
||||
--st <st> get another string (pervert ordering)
|
||||
-o <str> get another string
|
||||
|
||||
magic arguments
|
||||
--quux means --quux
|
||||
|
||||
EOF
|
||||
|
||||
test_expect_success 'test help' '
|
||||
@@ -114,4 +117,17 @@ test_expect_success 'detect possible typos' '
|
||||
git diff expect.err output.err
|
||||
'
|
||||
|
||||
cat > expect <<EOF
|
||||
boolean: 0
|
||||
integer: 0
|
||||
string: (not set)
|
||||
arg 00: --quux
|
||||
EOF
|
||||
|
||||
test_expect_success 'keep some options as arguments' '
|
||||
test-parse-options --quux > output 2> output.err &&
|
||||
test ! -s output.err &&
|
||||
git diff expect output
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user