fix cat-file usage message and documentation
cat-file with an object on the command line requires an option to tell it what to output (type, size, pretty-print, etc). However, the square brackets in the usage imply that those options are not required. This patch switches them to parentheses to indicate "required but grouped-OR" (curly braces might also work, but this follows the convention used already by "git stash"). While we're at it, let's change the <sha1> specifier in the usage to <object>. That's what the documentation uses, and it does actually use the regular object lookup. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
May 25, 2009 at 06:33 UTC
0e5168fd18f3975d71d3a292b0e0df174bb884d5
2 files changed
+4
-4
Documentation/git-cat-file.txt
+2
-2
@@ -9,8 +9,8 @@ git-cat-file - Provide content or type and size information for repository objec
9
SYNOPSIS
10
--------
11
[verse]
12
-'git cat-file' [-t | -s | -e | -p | <type>] <object>
13
-'git cat-file' [--batch | --batch-check] < <list-of-objects>
12
+'git cat-file' (-t | -s | -e | -p | <type>) <object>
13
+'git cat-file' (--batch | --batch-check) < <list-of-objects>
14
15
DESCRIPTION
16
-----------
builtin-cat-file.c
+2
-2
@@ -201,8 +201,8 @@ static int batch_objects(int print_contents)
201
}
202
203
static const char * const cat_file_usage[] = {
204
- "git cat-file [-t|-s|-e|-p|<type>] <sha1>",
205
- "git cat-file [--batch|--batch-check] < <list_of_sha1s>",
204
+ "git cat-file (-t|-s|-e|-p|<type>) <object>",
205
+ "git cat-file (--batch|--batch-check) < <list_of_objects>",
206
NULL
207
};
208