gitk: Second try to work around the command line limit on Windows
[git/dscho.git] / Documentation / git-cat-file.txt
blob58c8d65772af4ef20ad573af9dd28691f5357437
1 git-cat-file(1)
2 ===============
4 NAME
5 ----
6 git-cat-file - Provide content or type and size information for repository objects
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>
15 DESCRIPTION
16 -----------
17 In its first form, the command provides the content or the type of an object in
18 the repository. The type is required unless '-t' or '-p' is used to find the
19 object type, or '-s' is used to find the object size.
21 In the second form, a list of objects (separated by linefeeds) is provided on
22 stdin, and the SHA1, type, and size of each object is printed on stdout.
24 OPTIONS
25 -------
26 <object>::
27         The name of the object to show.
28         For a more complete list of ways to spell object names, see
29         the "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
31 -t::
32         Instead of the content, show the object type identified by
33         <object>.
35 -s::
36         Instead of the content, show the object size identified by
37         <object>.
39 -e::
40         Suppress all output; instead exit with zero status if <object>
41         exists and is a valid object.
43 -p::
44         Pretty-print the contents of <object> based on its type.
46 <type>::
47         Typically this matches the real type of <object> but asking
48         for a type that can trivially be dereferenced from the given
49         <object> is also permitted.  An example is to ask for a
50         "tree" with <object> being a commit object that contains it,
51         or to ask for a "blob" with <object> being a tag object that
52         points at it.
54 --batch::
55         Print the SHA1, type, size, and contents of each object provided on
56         stdin. May not be combined with any other options or arguments.
58 --batch-check::
59         Print the SHA1, type, and size of each object provided on stdin. May not
60         be combined with any other options or arguments.
62 OUTPUT
63 ------
64 If '-t' is specified, one of the <type>.
66 If '-s' is specified, the size of the <object> in bytes.
68 If '-e' is specified, no output.
70 If '-p' is specified, the contents of <object> are pretty-printed.
72 If <type> is specified, the raw (though uncompressed) contents of the <object>
73 will be returned.
75 If '--batch' is specified, output of the following form is printed for each
76 object specified on stdin:
78 ------------
79 <sha1> SP <type> SP <size> LF
80 <contents> LF
81 ------------
83 If '--batch-check' is specified, output of the following form is printed for
84 each object specified on stdin:
86 ------------
87 <sha1> SP <type> SP <size> LF
88 ------------
90 For both '--batch' and '--batch-check', output of the following form is printed
91 for each object specified on stdin that does not exist in the repository:
93 ------------
94 <object> SP missing LF
95 ------------
97 Author
98 ------
99 Written by Linus Torvalds <torvalds@osdl.org>
101 Documentation
102 --------------
103 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
107 Part of the linkgit:git[1] suite