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>
René Scharfe committed
Aug 5, 2023 at 16:37 UTC
aa43619bdf690c8ed44746030552a35244f97af7
2 files changed
+4
-4
Documentation/git-rev-parse.txt
+1
-1
@@ -398,7 +398,7 @@ some-command [<options>] <args>...
398
399
some-command does foo and bar!
400
--
401
-h,help show the help
401
+h,help! show the help
402
403
foo some nifty option --foo
404
bar= some cool option --bar with an argument
t/t1502-rev-parse-parseopt.sh
+3
-3
@@ -9,7 +9,7 @@ test_expect_success 'setup optionspec' '
9
|
10
|some-command does foo and bar!
11
|--
12
-|h,help show the help
12
+|h,help! show the help
13
|
14
|foo some nifty option --foo
15
|bar= some cool option --bar with an argument
@@ -288,7 +288,7 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:"
288
| [--another-option]
289
|cmd [--yet-another-option]
290
|--
291
- |h,help show the help
291
+ |h,help! show the help
292
EOF
293
294
sed -e "s/^|//" >expect <<-\END_EXPECT &&
@@ -322,7 +322,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
322
|line
323
|blurb
324
|--
325
- |h,help show the help
325
+ |h,help! show the help
326
EOF
327
328
sed -e "s/^|//" >expect <<-\END_EXPECT &&