Re: "git cat-file <sha1>" shows usage but should not?
- From
Jeff King <peff@peff.net>
- Date
- Apr 15, 2009, 16:54 UTC
- Message-ID
- <20090415165420.GB24528@coredump.intra.peff.net>
- In-Reply-To
- <49E61067.6060802@hartwork.org>
On Wed, Apr 15, 2009 at 06:50:47PM +0200, Sebastian Pipping wrote:
Show 9 quoted lines
> Here is what I did: > > $ git cat-file -t b8c11fbbffbe171c4960058fa2d96f708e57a80c > commit > > $ git cat-file b8c11fbbffbe171c4960058fa2d96f708e57a80c > usage: git cat-file [-t|-s|-e|-p|<type>] <sha1> > or: git cat-file [--batch|--batch-check] < <list_of_sha1s> > [..]
That usage message is misleading. You need to use one of -t, -s, -e, -p, or <type>. So it should perhaps just be:
git cat-file -t|-s|-e|-p|<type> <sha1>
though that looks terribly ugly. Suggestions welcome.
-Peff
P.S. Depending on what you're trying to accomplish, "git show <sha1>"
may be a better choice.