summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cae3aa7)
raw | patch | inline | side by side (parent: cae3aa7)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Sun, 31 Oct 2010 07:35:49 +0000 (02:35 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 9 Nov 2010 23:00:10 +0000 (15:00 -0800) |
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>
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>
t/t1502-rev-parse-parseopt.sh | patch | blob | history |
index b3195c47070b35d555f8cfae90497a2d00d10ca7..1efd7f76ddea8dbd788032c5a9076270d1159825 100755 (executable)
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
'