Skip to content

Commit c83d602

Browse files
committed
Merge branch 'dl/cat-file-doc-cleanup'
Doc cleanup. * dl/cat-file-doc-cleanup: git-cat-file.txt: remove references to "sha1" git-cat-file.txt: monospace args, placeholders and filenames
2 parents 25f9326 + f451960 commit c83d602

File tree

1 file changed

+34
-33
lines changed

1 file changed

+34
-33
lines changed

Documentation/git-cat-file.txt

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,42 +35,42 @@ OPTIONS
3535

3636
-t::
3737
Instead of the content, show the object type identified by
38-
<object>.
38+
`<object>`.
3939

4040
-s::
4141
Instead of the content, show the object size identified by
42-
<object>.
42+
`<object>`.
4343

4444
-e::
45-
Exit with zero status if <object> exists and is a valid
46-
object. If <object> is of an invalid format exit with non-zero and
45+
Exit with zero status if `<object>` exists and is a valid
46+
object. If `<object>` is of an invalid format exit with non-zero and
4747
emits an error on stderr.
4848

4949
-p::
50-
Pretty-print the contents of <object> based on its type.
50+
Pretty-print the contents of `<object>` based on its type.
5151

5252
<type>::
53-
Typically this matches the real type of <object> but asking
53+
Typically this matches the real type of `<object>` but asking
5454
for a type that can trivially be dereferenced from the given
55-
<object> is also permitted. An example is to ask for a
56-
"tree" with <object> being a commit object that contains it,
57-
or to ask for a "blob" with <object> being a tag object that
55+
`<object>` is also permitted. An example is to ask for a
56+
"tree" with `<object>` being a commit object that contains it,
57+
or to ask for a "blob" with `<object>` being a tag object that
5858
points at it.
5959

6060
--textconv::
6161
Show the content as transformed by a textconv filter. In this case,
62-
<object> has to be of the form <tree-ish>:<path>, or :<path> in
62+
`<object>` has to be of the form `<tree-ish>:<path>`, or `:<path>` in
6363
order to apply the filter to the content recorded in the index at
64-
<path>.
64+
`<path>`.
6565

6666
--filters::
6767
Show the content as converted by the filters configured in
68-
the current working tree for the given <path> (i.e. smudge filters,
69-
end-of-line conversion, etc). In this case, <object> has to be of
70-
the form <tree-ish>:<path>, or :<path>.
68+
the current working tree for the given `<path>` (i.e. smudge filters,
69+
end-of-line conversion, etc). In this case, `<object>` has to be of
70+
the form `<tree-ish>:<path>`, or `:<path>`.
7171

7272
--path=<path>::
73-
For use with --textconv or --filters, to allow specifying an object
73+
For use with `--textconv` or `--filters`, to allow specifying an object
7474
name and a path separately, e.g. when it is difficult to figure out
7575
the revision from which the blob came.
7676

@@ -115,15 +115,15 @@ OPTIONS
115115
repository.
116116

117117
--allow-unknown-type::
118-
Allow -s or -t to query broken/corrupt objects of unknown type.
118+
Allow `-s` or `-t` to query broken/corrupt objects of unknown type.
119119

120120
--follow-symlinks::
121-
With --batch or --batch-check, follow symlinks inside the
121+
With `--batch` or `--batch-check`, follow symlinks inside the
122122
repository when requesting objects with extended SHA-1
123123
expressions of the form tree-ish:path-in-tree. Instead of
124124
providing output about the link itself, provide output about
125125
the linked-to object. If a symlink points outside the
126-
tree-ish (e.g. a link to /foo or a root-level link to ../foo),
126+
tree-ish (e.g. a link to `/foo` or a root-level link to `../foo`),
127127
the portion of the link which is outside the tree will be
128128
printed.
129129
+
@@ -175,15 +175,15 @@ respectively print:
175175

176176
OUTPUT
177177
------
178-
If `-t` is specified, one of the <type>.
178+
If `-t` is specified, one of the `<type>`.
179179

180-
If `-s` is specified, the size of the <object> in bytes.
180+
If `-s` is specified, the size of the `<object>` in bytes.
181181

182-
If `-e` is specified, no output, unless the <object> is malformed.
182+
If `-e` is specified, no output, unless the `<object>` is malformed.
183183

184-
If `-p` is specified, the contents of <object> are pretty-printed.
184+
If `-p` is specified, the contents of `<object>` are pretty-printed.
185185

186-
If <type> is specified, the raw (though uncompressed) contents of the <object>
186+
If `<type>` is specified, the raw (though uncompressed) contents of the `<object>`
187187
will be returned.
188188

189189
BATCH OUTPUT
@@ -200,7 +200,7 @@ object, with placeholders of the form `%(atom)` expanded, followed by a
200200
newline. The available atoms are:
201201

202202
`objectname`::
203-
The 40-hex object name of the object.
203+
The full hex representation of the object name.
204204

205205
`objecttype`::
206206
The type of the object (the same as `cat-file -t` reports).
@@ -215,8 +215,9 @@ newline. The available atoms are:
215215

216216
`deltabase`::
217217
If the object is stored as a delta on-disk, this expands to the
218-
40-hex sha1 of the delta base object. Otherwise, expands to the
219-
null sha1 (40 zeroes). See `CAVEATS` below.
218+
full hex representation of the delta base object name.
219+
Otherwise, expands to the null OID (all zeroes). See `CAVEATS`
220+
below.
220221

221222
`rest`::
222223
If this atom is used in the output string, input lines are split
@@ -235,14 +236,14 @@ newline.
235236
For example, `--batch` without a custom format would produce:
236237

237238
------------
238-
<sha1> SP <type> SP <size> LF
239+
<oid> SP <type> SP <size> LF
239240
<contents> LF
240241
------------
241242

242243
Whereas `--batch-check='%(objectname) %(objecttype)'` would produce:
243244

244245
------------
245-
<sha1> SP <type> LF
246+
<oid> SP <type> LF
246247
------------
247248

248249
If a name is specified on stdin that cannot be resolved to an object in
@@ -258,7 +259,7 @@ If a name is specified that might refer to more than one object (an ambiguous sh
258259
<object> SP ambiguous LF
259260
------------
260261

261-
If --follow-symlinks is used, and a symlink in the repository points
262+
If `--follow-symlinks` is used, and a symlink in the repository points
262263
outside the repository, then `cat-file` will ignore any custom format
263264
and print:
264265

@@ -267,11 +268,11 @@ symlink SP <size> LF
267268
<symlink> LF
268269
------------
269270

270-
The symlink will either be absolute (beginning with a /), or relative
271-
to the tree root. For instance, if dir/link points to ../../foo, then
272-
<symlink> will be ../foo. <size> is the size of the symlink in bytes.
271+
The symlink will either be absolute (beginning with a `/`), or relative
272+
to the tree root. For instance, if dir/link points to `../../foo`, then
273+
`<symlink>` will be `../foo`. `<size>` is the size of the symlink in bytes.
273274

274-
If --follow-symlinks is used, the following error messages will be
275+
If `--follow-symlinks` is used, the following error messages will be
275276
displayed:
276277

277278
------------

0 commit comments

Comments
 (0)