X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-cat-file.txt;h=d35e8a04fe28b095b5405ae2e0b09e3ab448bf63;hb=2fd02c92dbb6e575b7e62ea9dfa85ef45ebe58b6;hp=afa095c79529dc92d5db6c54effd435c57f5eb7a;hpb=4b7f59af2a5b072a0a3950c956842e4d6223a167;p=git.git diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index afa095c79..d35e8a04f 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -8,20 +8,25 @@ git-cat-file - Provide content or type/size information for repository objects SYNOPSIS -------- -'git-cat-file' [-t | -s | -e | -p | ] +[verse] +'git cat-file' [-t | -s | -e | -p | ] +'git cat-file' [--batch | --batch-check] < DESCRIPTION ----------- -Provides content or type of objects in the repository. The type -is required unless '-t' or '-p' is used to find the object type, -or '-s' is used to find the object size. +In the first form, provides content or type of objects in the repository. The +type is required unless '-t' or '-p' is used to find the object type, or '-s' +is used to find the object size. + +In the second form, a list of object (separated by LFs) is provided on stdin, +and the SHA1, type, and size of each object is printed on stdout. OPTIONS ------- :: The name of the object to show. For a more complete list of ways to spell object names, see - "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. + "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1]. -t:: Instead of the content, show the object type identified by @@ -46,6 +51,14 @@ OPTIONS or to ask for a "blob" with being a tag object that points at it. +--batch:: + Print the SHA1, type, size, and contents of each object provided on + stdin. May not be combined with any other options or arguments. + +--batch-check:: + Print the SHA1, type, and size of each object provided on stdin. May not be + combined with any other options or arguments. + OUTPUT ------ If '-t' is specified, one of the . @@ -56,9 +69,30 @@ If '-e' is specified, no output. If '-p' is specified, the contents of are pretty-printed. -Otherwise the raw (though uncompressed) contents of the will -be returned. +If is specified, the raw (though uncompressed) contents of the +will be returned. + +If '--batch' is specified, output of the following form is printed for each +object specified on stdin: + +------------ + SP SP LF + LF +------------ + +If '--batch-check' is specified, output of the following form is printed for +each object specified fon stdin: + +------------ + SP SP LF +------------ + +For both '--batch' and '--batch-check', output of the following form is printed +for each object specified on stdin that does not exist in the repository: +------------ + SP missing LF +------------ Author ------ @@ -70,4 +104,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list