Skip to content

Commit aa43619

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d716512 commit aa43619

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Documentation/git-rev-parse.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ some-command [<options>] <args>...
398398

399399
some-command does foo and bar!
400400
--
401-
h,help show the help
401+
h,help! show the help
402402

403403
foo some nifty option --foo
404404
bar= some cool option --bar with an argument

t/t1502-rev-parse-parseopt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test_expect_success 'setup optionspec' '
99
|
1010
|some-command does foo and bar!
1111
|--
12-
|h,help show the help
12+
|h,help! show the help
1313
|
1414
|foo some nifty option --foo
1515
|bar= some cool option --bar with an argument
@@ -288,7 +288,7 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:"
288288
| [--another-option]
289289
|cmd [--yet-another-option]
290290
|--
291-
|h,help show the help
291+
|h,help! show the help
292292
EOF
293293
294294
sed -e "s/^|//" >expect <<-\END_EXPECT &&
@@ -322,7 +322,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
322322
|line
323323
|blurb
324324
|--
325-
|h,help show the help
325+
|h,help! show the help
326326
EOF
327327
328328
sed -e "s/^|//" >expect <<-\END_EXPECT &&

0 commit comments

Comments
 (0)