diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-10-13 17:39:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-13 18:32:55 +0200 |
commit | d4056dba1fbe7a0b1e36eab34b9a2ff8435f86a4 (patch) | |
tree | 56914eb4e7f0280043bc97fee9591d8444f9ff29 /builtin/bugreport.c | |
parent | doc txt & -h consistency: word-wrap (diff) | |
download | git-d4056dba1fbe7a0b1e36eab34b9a2ff8435f86a4.tar.xz git-d4056dba1fbe7a0b1e36eab34b9a2ff8435f86a4.zip |
doc txt & -h consistency: fix incorrect alternates syntax
Fix the incorrect "[-o | --option <argument>]" syntax, which should be
"[(-o | --option) <argument>]", we were previously claiming that only
the long option accepted the "<argument>", which isn't what we meant.
This syntax issue for "bugreport" originated in
238b439d698 (bugreport: add tool to generate debugging info,
2020-04-16), and for "diagnose" in 6783fd3cef0 (builtin/diagnose.c:
create 'git diagnose' builtin, 2022-08-12), which copied and adjusted
"bugreport" documentation and code.
In the case of "Documentation/git-stash.txt" and "builtin/stash.c"
this is not a "doc txt & -h consistency" change, as we're changing
both versions, doing so here makes a subsequent change smaller.
In that case fix the incorrect "[-o | --option <argument>]" syntax,
which should be "[(-o | --option) <argument>]", we were previously
claiming that only the long option accepted the "<argument>", which
isn't what we meant.
The "stash" issue has been with us in both the "-h" and *.txt versions
since bd514cada4b (stash: introduce 'git stash store', 2013-06-15).
We could claim that this isn't a syntax issue if a "vertical bar binds
tighter than option and its argument", but such a rule would change
e.g. this "cat-file" SYNOPSIS example to mean something we don't:
... [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]
We have various other examples where the post-image here is already
used, e.g. for "format-patch" ("-o"), "grep" ("-m"),
"submodule" ("set-branch -b") etc.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/bugreport.c')
-rw-r--r-- | builtin/bugreport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/bugreport.c b/builtin/bugreport.c index faa268f3cf..23170113cc 100644 --- a/builtin/bugreport.c +++ b/builtin/bugreport.c @@ -60,7 +60,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit) } static const char * const bugreport_usage[] = { - N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>]\n" + N_("git bugreport [(-o|--output-directory) <file>] [(-s|--suffix) <format>]\n" " [--diagnose[=<mode>]"), NULL }; |