From d9054a19ed2656007a4ed198f1f07a00da9e7103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 13 Oct 2022 17:39:18 +0200 Subject: doc txt & -h consistency: add missing options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change those built-in commands that were attempting to exhaustively list the options in the "-h" output to actually do so, and always have *.txt documentation know about the exhaustive list of options. Let's also fix the documentation and -h output for those built-in commands where the *.txt and -h output was a mismatch of missing options on both sides. In the case of "interpret-trailers" fixing the missing options reveals that the *.txt version was implicitly claiming that the command had two operating modes, which a look at the -h version (and studying the documentation) will show is not the case. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano diff --git a/Documentation/git-commit-graph.txt b/Documentation/git-commit-graph.txt index 047decd..1532085 100644 --- a/Documentation/git-commit-graph.txt +++ b/Documentation/git-commit-graph.txt @@ -10,7 +10,10 @@ SYNOPSIS -------- [verse] 'git commit-graph verify' [--object-dir ] [--shallow] [--[no-]progress] -'git commit-graph write' [--object-dir ] [--[no-]progress] +'git commit-graph write' [--object-dir ] [--append] + [--split[=]] [--reachable | --stdin-packs | --stdin-commits] + [--changed-paths] [--[no-]max-new-filters ] [--[no-]progress] + DESCRIPTION diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt index 956a01d..057744e 100644 --- a/Documentation/git-interpret-trailers.txt +++ b/Documentation/git-interpret-trailers.txt @@ -8,8 +8,9 @@ git-interpret-trailers - Add or parse structured information in commit messages SYNOPSIS -------- [verse] -'git interpret-trailers' [] [(--trailer [(=|:)])...] [...] -'git interpret-trailers' [] [--parse] [...] +'git interpret-trailers' [--in-place] [--trim-empty] + [(--trailer [(=|:)])...] + [--parse] [...] DESCRIPTION ----------- diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index e4b85d2..cc8d584 100644 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@ -15,6 +15,7 @@ #include "parse-options.h" static const char * const commit_tree_usage[] = { + N_("git commit-tree [(-p )...]"), N_("git commit-tree [(-p )...] [-S[]] [(-m )...]\n" " [(-F )...] "), NULL diff --git a/builtin/fsck.c b/builtin/fsck.c index 6c73092..d9d163e 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -819,7 +819,10 @@ static int mark_packed_for_connectivity(const struct object_id *oid, } static char const * const fsck_usage[] = { - N_("git fsck [] [...]"), + N_("git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n" + " [--[no-]full] [--strict] [--verbose] [--lost-found]\n" + " [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n" + " [--[no-]name-objects] [...]"), NULL }; diff --git a/builtin/hash-object.c b/builtin/hash-object.c index f7c1680..b506381 100644 --- a/builtin/hash-object.c +++ b/builtin/hash-object.c @@ -81,8 +81,8 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix) { static const char * const hash_object_usage[] = { N_("git hash-object [-t ] [-w] [--path= | --no-filters]\n" - " [--stdin] [--] ..."), - "git hash-object --stdin-paths", + " [--stdin [--literally]] [--] ..."), + N_("git hash-object [-t ] [-w] --stdin-paths [--no-filters]"), NULL }; const char *type = blob_type; diff --git a/builtin/init-db.c b/builtin/init-db.c index 08ba006..dcaaf10 100644 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@ -516,6 +516,8 @@ static int shared_callback(const struct option *opt, const char *arg, int unset) static const char *const init_db_usage[] = { N_("git init [-q | --quiet] [--bare] [--template=]\n" + " [--separate-git-dir ] [--object-format=]\n" + " [-b | --initial-branch=]\n" " [--shared[=]] []"), NULL }; diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c index 4cf0cf2..e58627c 100644 --- a/builtin/interpret-trailers.c +++ b/builtin/interpret-trailers.c @@ -15,7 +15,7 @@ static const char * const git_interpret_trailers_usage[] = { N_("git interpret-trailers [--in-place] [--trim-empty]\n" " [(--trailer [(=|:)])...]\n" - " [...]"), + " [--parse] [...]"), NULL }; diff --git a/builtin/rm.c b/builtin/rm.c index b6ba859..f0d025a 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -17,7 +17,9 @@ #include "pathspec.h" static const char * const builtin_rm_usage[] = { - N_("git rm [] [--] ..."), + N_("git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]\n" + " [--quiet] [--pathspec-from-file= [--pathspec-file-nul]]\n" + " [--] [...]"), NULL }; -- cgit v0.10.2-6-g49f6