@matheusbsbs / matheus-bagliano / commits / 0172f7834a
Fork 0

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 <chriscool@tuxfamily.org> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed Jul 1, 2020 at 12:16 UTC 0172f7834a31ae7cb9873feaaaa63939352fa3ae
2 files changed +2 -2
Documentation/git-cat-file.txt
+1 -1
@@ -10,7 +10,7 @@ SYNOPSIS
10 --------
11 [verse]
12 '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]
14
15 DESCRIPTION
16 -----------
builtin/cat-file.c
+1 -1
@@ -593,7 +593,7 @@ static int batch_objects(struct batch_options *opt)
593
594 static const char * const cat_file_usage[] = {
595 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]"),
597 NULL
598 };
599