]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc txt & -h consistency: add missing options
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 13 Oct 2022 15:39:18 +0000 (17:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Oct 2022 16:32:57 +0000 (09:32 -0700)
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-commit-graph.txt
Documentation/git-interpret-trailers.txt
builtin/commit-tree.c
builtin/fsck.c
builtin/hash-object.c
builtin/init-db.c
builtin/interpret-trailers.c
builtin/rm.c

index 047decdb65b029f1974e7ca2c07406a5ca868bdd..15320851b487abdae47ff40fd54c184ef2f35f68 100644 (file)
@@ -10,7 +10,10 @@ SYNOPSIS
 --------
 [verse]
 'git commit-graph verify' [--object-dir <dir>] [--shallow] [--[no-]progress]
-'git commit-graph write' <options> [--object-dir <dir>] [--[no-]progress]
+'git commit-graph write' [--object-dir <dir>] [--append]
+                       [--split[=<strategy>]] [--reachable | --stdin-packs | --stdin-commits]
+                       [--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress]
+                       <split options>
 
 
 DESCRIPTION
index 956a01d184f78832ea8ac8d1874ae1cc568dccaa..057744e6d73942d305bacb35537f29c085dbdc6c 100644 (file)
@@ -8,8 +8,9 @@ git-interpret-trailers - Add or parse structured information in commit messages
 SYNOPSIS
 --------
 [verse]
-'git interpret-trailers' [<options>] [(--trailer <token>[(=|:)<value>])...] [<file>...]
-'git interpret-trailers' [<options>] [--parse] [<file>...]
+'git interpret-trailers' [--in-place] [--trim-empty]
+                       [(--trailer <token>[(=|:)<value>])...]
+                       [--parse] [<file>...]
 
 DESCRIPTION
 -----------
index e4b85d29d56bd6426710f1404e648ddfc6418b25..cc8d584be2f4a9d3b0c950a4b8cbc6c140904d8c 100644 (file)
@@ -15,6 +15,7 @@
 #include "parse-options.h"
 
 static const char * const commit_tree_usage[] = {
+       N_("git commit-tree <tree> [(-p <parent>)...]"),
        N_("git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
           "                [(-F <file>)...] <tree>"),
        NULL
index 6c73092f10dedd64a53090847c16b65232bc0c86..d9d163eabe4c4d57975560132ce538672ba9d094 100644 (file)
@@ -819,7 +819,10 @@ static int mark_packed_for_connectivity(const struct object_id *oid,
 }
 
 static char const * const fsck_usage[] = {
-       N_("git fsck [<options>] [<object>...]"),
+       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] [<object>...]"),
        NULL
 };
 
index f7c16802f0c26bb0a11d52a5f8299f120a3fda34..b5063815020d4a54517e8c5a8b2cb6918fe77e7e 100644 (file)
@@ -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 <type>] [-w] [--path=<file> | --no-filters]\n"
-                  "                [--stdin] [--] <file>..."),
-               "git hash-object  --stdin-paths",
+                  "                [--stdin [--literally]] [--] <file>..."),
+               N_("git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]"),
                NULL
        };
        const char *type = blob_type;
index 08ba006d55ec176e6bfc98f667b2ab78e1cdc3e5..dcaaf102eaf62bee5d09adabd2a5de21c8379c03 100644 (file)
@@ -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=<template-directory>]\n"
+          "         [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
+          "         [-b <branch-name> | --initial-branch=<branch-name>]\n"
           "         [--shared[=<permissions>]] [<directory>]"),
        NULL
 };
index 4cf0cf265dcaf9d6958b8d6fe52ec86162ff9f7c..e58627c72a98510f12b0a8494432e44a6ccfad2e 100644 (file)
@@ -15,7 +15,7 @@
 static const char * const git_interpret_trailers_usage[] = {
        N_("git interpret-trailers [--in-place] [--trim-empty]\n"
           "                       [(--trailer <token>[(=|:)<value>])...]\n"
-          "                       [<file>...]"),
+          "                       [--parse] [<file>...]"),
        NULL
 };
 
index b6ba859fe42571fd868697db1da8dac6ffd2c32e..f0d025a4e23d3ab28f34e282e0e2ef43459b2688 100644 (file)
@@ -17,7 +17,9 @@
 #include "pathspec.h"
 
 static const char * const builtin_rm_usage[] = {
-       N_("git rm [<options>] [--] <file>..."),
+       N_("git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]\n"
+          "       [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
+          "       [--] [<pathspec>...]"),
        NULL
 };