Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2023-08-05 17:40:59 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-07 03:16:50 +0300
commite8e5d294dc6e3b6b32132cc8018d01ce35ad0af0 (patch)
tree0322d505e3563a0a775822be930b66d26ccc8c8c /Documentation/git-rev-parse.txt
parentd5dc68f73041f95c1179fb092005e2326bdd8a7b (diff)
parse-options: show negatability of options in short help
Add a "[no-]" prefix to options without the flag PARSE_OPT_NONEG to document the fact that you can negate them. This looks a bit strange for options that already start with "no-", e.g. for the option --no-name of git show-branch: --[no-]no-name suppress naming strings You can actually use --no-no-name as an alias of --name, so the short help is not wrong. If we strip off any of the "no-"s, we lose either the ability to see if the remaining one belongs to the documented variant or to see if it can be negated. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.txt')
-rw-r--r--Documentation/git-rev-parse.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 6e8ff9ace1..6a4968f68a 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -424,10 +424,10 @@ usage: some-command [<options>] <args>...
some-command does foo and bar!
-h, --help show the help
- --foo some nifty option --foo
- --bar ... some cool option --bar with an argument
- --baz <arg> another cool option --baz with a named argument
- --qux[=<path>] qux may take a path argument but has meaning by itself
+ --[no-]foo some nifty option --foo
+ --[no-]bar ... some cool option --bar with an argument
+ --[no-]baz <arg> another cool option --baz with a named argument
+ --[no-]qux[=<path>] qux may take a path argument but has meaning by itself
An option group Header
-C[...] option C with an optional argument