Skip to content

Commit d9054a1

Browse files
avargitster
authored andcommitted
doc txt & -h consistency: add missing options
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3e4ebe3 commit d9054a1

File tree

8 files changed

+20
-8
lines changed

8 files changed

+20
-8
lines changed

Documentation/git-commit-graph.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git commit-graph verify' [--object-dir <dir>] [--shallow] [--[no-]progress]
13-
'git commit-graph write' <options> [--object-dir <dir>] [--[no-]progress]
13+
'git commit-graph write' [--object-dir <dir>] [--append]
14+
[--split[=<strategy>]] [--reachable | --stdin-packs | --stdin-commits]
15+
[--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress]
16+
<split options>
1417

1518

1619
DESCRIPTION

Documentation/git-interpret-trailers.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ git-interpret-trailers - Add or parse structured information in commit messages
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git interpret-trailers' [<options>] [(--trailer <token>[(=|:)<value>])...] [<file>...]
12-
'git interpret-trailers' [<options>] [--parse] [<file>...]
11+
'git interpret-trailers' [--in-place] [--trim-empty]
12+
[(--trailer <token>[(=|:)<value>])...]
13+
[--parse] [<file>...]
1314

1415
DESCRIPTION
1516
-----------

builtin/commit-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "parse-options.h"
1616

1717
static const char * const commit_tree_usage[] = {
18+
N_("git commit-tree <tree> [(-p <parent>)...]"),
1819
N_("git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
1920
" [(-F <file>)...] <tree>"),
2021
NULL

builtin/fsck.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,10 @@ static int mark_packed_for_connectivity(const struct object_id *oid,
819819
}
820820

821821
static char const * const fsck_usage[] = {
822-
N_("git fsck [<options>] [<object>...]"),
822+
N_("git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n"
823+
" [--[no-]full] [--strict] [--verbose] [--lost-found]\n"
824+
" [--[no-]dangling] [--[no-]progress] [--connectivity-only]\n"
825+
" [--[no-]name-objects] [<object>...]"),
823826
NULL
824827
};
825828

builtin/hash-object.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)
8181
{
8282
static const char * const hash_object_usage[] = {
8383
N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
84-
" [--stdin] [--] <file>..."),
85-
"git hash-object --stdin-paths",
84+
" [--stdin [--literally]] [--] <file>..."),
85+
N_("git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]"),
8686
NULL
8787
};
8888
const char *type = blob_type;

builtin/init-db.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
516516

517517
static const char *const init_db_usage[] = {
518518
N_("git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
519+
" [--separate-git-dir <git-dir>] [--object-format=<format>]\n"
520+
" [-b <branch-name> | --initial-branch=<branch-name>]\n"
519521
" [--shared[=<permissions>]] [<directory>]"),
520522
NULL
521523
};

builtin/interpret-trailers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
static const char * const git_interpret_trailers_usage[] = {
1616
N_("git interpret-trailers [--in-place] [--trim-empty]\n"
1717
" [(--trailer <token>[(=|:)<value>])...]\n"
18-
" [<file>...]"),
18+
" [--parse] [<file>...]"),
1919
NULL
2020
};
2121

builtin/rm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#include "pathspec.h"
1818

1919
static const char * const builtin_rm_usage[] = {
20-
N_("git rm [<options>] [--] <file>..."),
20+
N_("git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]\n"
21+
" [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n"
22+
" [--] [<pathspec>...]"),
2123
NULL
2224
};
2325

0 commit comments

Comments
 (0)