]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1502, docs: disallow --no-help
authorRené Scharfe <l.s.r@web.de>
Sat, 5 Aug 2023 14:37:55 +0000 (16:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Aug 2023 00:16:50 +0000 (17:16 -0700)
"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>
Documentation/git-rev-parse.txt
t/t1502-rev-parse-parseopt.sh

index f26a7591e3737df6bcf190fc26f0fe2bf50fcd83..6e8ff9ace15dd65a64762809b8e421d57217f911 100644 (file)
@@ -398,7 +398,7 @@ some-command [<options>] <args>...
 
 some-command does foo and bar!
 --
-h,help    show the help
+h,help!   show the help
 
 foo       some nifty option --foo
 bar=      some cool option --bar with an argument
index dd811b7fb467c4f3f27ef1be14427e022f73caeb..0cdc6eb8b318ad297eb23f9e51ad1382b4a4773c 100755 (executable)
@@ -9,7 +9,7 @@ test_expect_success 'setup optionspec' '
 |
 |some-command does foo and bar!
 |--
-|h,help    show the help
+|h,help!   show the help
 |
 |foo       some nifty option --foo
 |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]
        |cmd [--yet-another-option]
        |--
-       |h,help    show the help
+       |h,help!   show the help
        EOF
 
        sed -e "s/^|//" >expect <<-\END_EXPECT &&
@@ -322,7 +322,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
        |line
        |blurb
        |--
-       |h,help    show the help
+       |h,help!   show the help
        EOF
 
        sed -e "s/^|//" >expect <<-\END_EXPECT &&