Skip to content

Commit 0172f78

Browse files
chriscoolgitster
authored andcommitted
cat-file: add missing [=<format>] to usage/synopsis
When displaying cat-file usage, the fact that a <format> can be specified is only visible when lookling at the --batch and --batch-check options which are shown like this: --batch[=<format>] show info and content of objects fed from the standard input --batch-check[=<format>] show info about objects fed from the standard input It seems more coherent and improves discovery to also show it on the usage line. In the documentation the DESCRIPTION tells us that "The output format can be overridden using the optional <format> argument", but we can't see the <format> argument in the SYNOPSIS above the description which is confusing. Signed-off-by: Christian Couder <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent af6b65d commit 0172f78

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Documentation/git-cat-file.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git cat-file' (-t [--allow-unknown-type]| -s [--allow-unknown-type]| -e | -p | <type> | --textconv | --filters ) [--path=<path>] <object>
13-
'git cat-file' (--batch | --batch-check) [ --textconv | --filters ] [--follow-symlinks]
13+
'git cat-file' (--batch[=<format>] | --batch-check[=<format>]) [ --textconv | --filters ] [--follow-symlinks]
1414

1515
DESCRIPTION
1616
-----------

builtin/cat-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ static int batch_objects(struct batch_options *opt)
593593

594594
static const char * const cat_file_usage[] = {
595595
N_("git cat-file (-t [--allow-unknown-type] | -s [--allow-unknown-type] | -e | -p | <type> | --textconv | --filters) [--path=<path>] <object>"),
596-
N_("git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]"),
596+
N_("git cat-file (--batch[=<format>] | --batch-check[=<format>]) [--follow-symlinks] [--textconv | --filters]"),
597597
NULL
598598
};
599599

0 commit comments

Comments
 (0)