Home Explore Blog CI



git

2nd chunk of `Documentation/git-cat-file.adoc`
208492dae34e24a14967f7791fe31efd1fc04f6c2f1705a90000000100000fb5
 will not be
	printed at all. The '<filter-spec>' may be one of the following:
+
The form '--filter=blob:none' omits all blobs.
+
The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n
bytes or units.  n may be zero.  The suffixes k, m, and g can be used to name
units in KiB, MiB, or GiB.  For example, 'blob:limit=1k' is the same as
'blob:limit=1024'.
+
The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects which
are not of the requested type.

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

--batch::
--batch=<format>::
	Print object information and contents for each object provided
	on stdin. May not be combined with any other options or arguments
	except `--textconv`, `--filters`, or `--use-mailmap`.
+
--
	* When used with `--textconv` or `--filters`, the input lines
	  must specify the path, separated by whitespace. See the section
	  `BATCH OUTPUT` below for details.

	* When used with `--use-mailmap`, for commit and tag objects, the
	  contents part of the output shows the identities replaced using the
	  mailmap mechanism, while the information part of the output shows
	  the size of the object as if it actually recorded the replacement
	  identities.
--

--batch-check::
--batch-check=<format>::
	Print object information for each object provided on stdin. May not be
	combined with any other options or arguments except `--textconv`, `--filters`
	or `--use-mailmap`.
+
--
	* When used with `--textconv` or `--filters`, the input lines must
	 specify the path, separated by whitespace. See the section
	 `BATCH OUTPUT` below for details.

	* When used with `--use-mailmap`, for commit and tag objects, the
	  printed object information shows the size of the object as if the
	  identities recorded in it were replaced by the mailmap mechanism.
--

--batch-command::
--batch-command=<format>::
	Enter a command mode that reads commands and arguments from stdin. May
	only be combined with `--buffer`, `--textconv`, `--use-mailmap` or
	`--filters`.
+
--
	* When used with `--textconv` or `--filters`, the input lines must
	  specify the path, separated by whitespace. See the section
	  `BATCH OUTPUT` below for details.

	* When used with `--use-mailmap`, for commit and tag objects, the
	  `contents` command shows the identities replaced using the
	  mailmap mechanism, while the `info` command shows the size
	  of the object as if it actually recorded the replacement
	  identities.
--
+
`--batch-command` recognizes the following commands:
+
--
contents <object>::
	Print object contents for object reference `<object>`. This corresponds to
	the output of `--batch`.

info <object>::
	Print object info for object reference `<object>`. This corresponds to the
	output of `--batch-check`.

flush::
	Used with `--buffer` to execute all preceding commands that were issued
	since the beginning or since the last flush was issued. When `--buffer`
	is used, no output will come until a `flush` is issued. When `--buffer`
	is not used, commands are flushed each time without issuing `flush`.
--
+

--batch-all-objects::
	Instead of reading a list of objects on stdin, perform the
	requested batch operation on all objects in the repository and
	any alternate object stores (not just reachable objects).
	Requires `--batch` or `--batch-check` be specified. By default,
	the objects are visited in order sorted by their hashes; see
	also `--unordered` below. Objects are presented as-is, without
	respecting the "replace" mechanism of linkgit:git-replace[1].

--buffer::
	Normally batch output is flushed after each object is output, so
	that a process can interactively read and write from
	`cat-file`. With this option, the output uses normal stdio
	buffering; this is much more efficient when invoking
	`--batch-check` or `--batch-command` on a large number of objects.

--unordered::
	When `--batch-all-objects`

Title: Git Cat File Command Options
Summary
The git-cat-file command supports various options, including filters, batch modes, and output formats, allowing users to customize the command's behavior, such as omitting certain objects, specifying output formats, and controlling the output of batch operations.