mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
t1502 (rev-parse --parseopt): test exit code from "-h"
rev-parse --parseopt exits with code 129 (usage error) when asked to dump usage with -h on behalf of another command. Scripts can take advantage of this to avoid trying to parse usage information as though it were the regular output from some git command. Noticed with an &&-chaining tester. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
cae3aa79aa
commit
2b5ec01845
@ -40,7 +40,7 @@ extra1 line above used to cause a segfault but no longer does
|
||||
EOF
|
||||
|
||||
test_expect_success 'test --parseopt help output' '
|
||||
git rev-parse --parseopt -- -h > output < optionspec
|
||||
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec &&
|
||||
test_cmp expect output
|
||||
'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user