]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cat-file: add missing [=<format>] to usage/synopsis
authorChristian Couder <christian.couder@gmail.com>
Wed, 1 Jul 2020 10:16:18 +0000 (12:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Jul 2020 22:54:05 +0000 (15:54 -0700)
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>
Documentation/git-cat-file.txt
builtin/cat-file.c

index 8eca671b8278cfe02692605b80a9121bc5717567..8e192d87db4c6f8114d591e99f48c8783336d83d 100644 (file)
@@ -10,7 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git cat-file' (-t [--allow-unknown-type]| -s [--allow-unknown-type]| -e | -p | <type> | --textconv | --filters ) [--path=<path>] <object>
-'git cat-file' (--batch | --batch-check) [ --textconv | --filters ] [--follow-symlinks]
+'git cat-file' (--batch[=<format>] | --batch-check[=<format>]) [ --textconv | --filters ] [--follow-symlinks]
 
 DESCRIPTION
 -----------
index 272f9fc6d7cb540c89c3dca13969398afd3c1ee1..4cb161304743f879cae6725c9aff417a740c3cf4 100644 (file)
@@ -593,7 +593,7 @@ static int batch_objects(struct batch_options *opt)
 
 static const char * const cat_file_usage[] = {
        N_("git cat-file (-t [--allow-unknown-type] | -s [--allow-unknown-type] | -e | -p | <type> | --textconv | --filters) [--path=<path>] <object>"),
-       N_("git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]"),
+       N_("git cat-file (--batch[=<format>] | --batch-check[=<format>]) [--follow-symlinks] [--textconv | --filters]"),
        NULL
 };