parse-opt: make PARSE_OPT_STOP_AT_NON_OPTION available to git rev-parse

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Uwe Kleine-König
2009-06-14 01:58:43 +02:00
committed by Junio C Hamano
parent 824af25ace
commit 6e0800ef25
3 changed files with 16 additions and 2 deletions

View File

@ -65,6 +65,11 @@ test_expect_success 'test --parseopt with --' '
test_cmp expect output
'
test_expect_success 'test --parseopt --stop-at-non-option' '
git rev-parse --parseopt --stop-at-non-option -- --foo arg --bar=ham < optionspec > output &&
test_cmp expect output
'
cat > expect <<EOF
set -- --foo -- '--' 'arg' '--bar=ham'
EOF