t1502, docs: disallow --no-help

"git rev-parse --parseopt" handles the built-in options -h and --help,
but not --no-help.  Make test definitions and documentation examples
more realistic by disabling negation.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2023-08-05 16:37:55 +02:00
committed by Junio C Hamano
parent d716512870
commit aa43619bdf
2 changed files with 4 additions and 4 deletions

View File

@ -398,7 +398,7 @@ some-command [<options>] <args>...
some-command does foo and bar! some-command does foo and bar!
-- --
h,help show the help h,help! show the help
foo some nifty option --foo foo some nifty option --foo
bar= some cool option --bar with an argument bar= some cool option --bar with an argument

View File

@ -9,7 +9,7 @@ test_expect_success 'setup optionspec' '
| |
|some-command does foo and bar! |some-command does foo and bar!
|-- |--
|h,help show the help |h,help! show the help
| |
|foo some nifty option --foo |foo some nifty option --foo
|bar= some cool option --bar with an argument |bar= some cool option --bar with an argument
@ -288,7 +288,7 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:"
| [--another-option] | [--another-option]
|cmd [--yet-another-option] |cmd [--yet-another-option]
|-- |--
|h,help show the help |h,help! show the help
EOF EOF
sed -e "s/^|//" >expect <<-\END_EXPECT && sed -e "s/^|//" >expect <<-\END_EXPECT &&
@ -322,7 +322,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
|line |line
|blurb |blurb
|-- |--
|h,help show the help |h,help! show the help
EOF EOF
sed -e "s/^|//" >expect <<-\END_EXPECT && sed -e "s/^|//" >expect <<-\END_EXPECT &&