doc txt & -h consistency: add or fix optional "--" syntax

Add the "[--]" for those cases where the *.txt and -h were inconsistent, or where we incorrectly stated in one but not the other that the "--" was mandatory. In the case of "rev-list" both sides were wrong, as we we don't require one or more paths if "--" is used, e.g. this is OK: git rev-list HEAD -- That part of this change is not a "doc txt & -h consistency" change, as we're changing both versions, doing so here makes both sides consistent. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Oct 13, 2022 at 17:39 UTC c08cfc395fa40f9ee610a05c23c982a7e11c8fa9
4 files changed +4 -4
Documentation/git-rev-list.txt
+1 -1
@@ -9,7 +9,7 @@ git-rev-list - Lists commit objects in reverse chronological order
9 SYNOPSIS
10 --------
11 [verse]
12 -'git rev-list' [<options>] <commit>... [[--] <path>...]
12 +'git rev-list' [<options>] <commit>... [--] [<path>...]
13
14 DESCRIPTION
15 -----------
builtin/for-each-repo.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "string-list.h"
7
8 static const char * const for_each_repo_usage[] = {
9 - N_("git for-each-repo --config=<config> <arguments>"),
9 + N_("git for-each-repo --config=<config> [--] <arguments>"),
10 NULL
11 };
12
builtin/rev-list.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "packfile.h"
21
22 static const char rev_list_usage[] =
23 -"git rev-list [<options>] <commit>... [-- <path>...]\n"
23 +"git rev-list [<options>] <commit>... [--] [<path>...]\n"
24 "\n"
25 " limiting output:\n"
26 " --max-count=<n>\n"
builtin/verify-pack.c
+1 -1
@@ -56,7 +56,7 @@ static int verify_one_pack(const char *path, unsigned int flags, const char *has
56 }
57
58 static const char * const verify_pack_usage[] = {
59 - N_("git verify-pack [-v | --verbose] [-s | --stat-only] <pack>.idx..."),
59 + N_("git verify-pack [-v | --verbose] [-s | --stat-only] [--] <pack>.idx..."),
60 NULL
61 };
62