]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc txt & -h consistency: add or fix optional "--" syntax
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 13 Oct 2022 15:39:11 +0000 (17:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Oct 2022 16:32:56 +0000 (09:32 -0700)
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>
Documentation/git-rev-list.txt
builtin/for-each-repo.c
builtin/rev-list.c
builtin/verify-pack.c

index 20bb8e82176b89cbbe68403301a43848b2bef912..51029a22715cb3b52fdad8cb868070d9ac626246 100644 (file)
@@ -9,7 +9,7 @@ git-rev-list - Lists commit objects in reverse chronological order
 SYNOPSIS
 --------
 [verse]
-'git rev-list' [<options>] <commit>... [[--] <path>...]
+'git rev-list' [<options>] <commit>... [--] [<path>...]
 
 DESCRIPTION
 -----------
index c6379b783c8407c954f734ce9bbb49202f29a12a..d45d873f5797c9d1aa836f5d53e7c5b7b80e9ef4 100644 (file)
@@ -6,7 +6,7 @@
 #include "string-list.h"
 
 static const char * const for_each_repo_usage[] = {
-       N_("git for-each-repo --config=<config> <arguments>"),
+       N_("git for-each-repo --config=<config> [--] <arguments>"),
        NULL
 };
 
index ada68a4af5e22bf79c860d8727022bad8501614a..3acd93f71e1cf71edb4e01d48708adf2554986ad 100644 (file)
@@ -20,7 +20,7 @@
 #include "packfile.h"
 
 static const char rev_list_usage[] =
-"git rev-list [<options>] <commit>... [-- <path>...]\n"
+"git rev-list [<options>] <commit>... [--] [<path>...]\n"
 "\n"
 "  limiting output:\n"
 "    --max-count=<n>\n"
index db9ac5c46067db7e9017cbd1079df3cf766b9002..27d6f75fd8ada57088d33c3c4945b07ed33bbb0e 100644 (file)
@@ -56,7 +56,7 @@ static int verify_one_pack(const char *path, unsigned int flags, const char *has
 }
 
 static const char * const verify_pack_usage[] = {
-       N_("git verify-pack [-v | --verbose] [-s | --stat-only] <pack>.idx..."),
+       N_("git verify-pack [-v | --verbose] [-s | --stat-only] [--] <pack>.idx..."),
        NULL
 };