summaryrefslogtreecommitdiff
path: root/builtin-cat-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-05-25 10:33:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-25 19:08:15 (GMT)
commit0e5168fd18f3975d71d3a292b0e0df174bb884d5 (patch)
treebbeb407f4d5fc43c3674be1968699da7955de118 /builtin-cat-file.c
parentfa250759794ab98e6edfbbf2f6aa2cb912e535eb (diff)
downloadgit-0e5168fd18f3975d71d3a292b0e0df174bb884d5.zip
git-0e5168fd18f3975d71d3a292b0e0df174bb884d5.tar.gz
git-0e5168fd18f3975d71d3a292b0e0df174bb884d5.tar.bz2
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>
Diffstat (limited to 'builtin-cat-file.c')
-rw-r--r--builtin-cat-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index 8fad19d..43ffe7f 100644
--- a/builtin-cat-file.c
+++ b/builtin-cat-file.c
@@ -201,8 +201,8 @@ static int batch_objects(int print_contents)
}
static const char * const cat_file_usage[] = {
- "git cat-file [-t|-s|-e|-p|<type>] <sha1>",
- "git cat-file [--batch|--batch-check] < <list_of_sha1s>",
+ "git cat-file (-t|-s|-e|-p|<type>) <object>",
+ "git cat-file (--batch|--batch-check) < <list_of_objects>",
NULL
};