X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-cat-file.txt;h=d35e8a04fe28b095b5405ae2e0b09e3ab448bf63;hb=58e93fa357006d9a231da48fb81eb23c417ed927;hp=df42cb10f24825623ffe32579f0cfbcda6f0337b;hpb=a41acc63badf20cbb22cca61039dca9309deaa19;p=git.git diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index df42cb10f..b191276d7 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -3,25 +3,30 @@ git-cat-file(1) NAME ---- -git-cat-file - Provide content or type/size information for repository objects +git-cat-file - Provide content or type and 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 its first form, the command provides the content or the type of an object 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 objects (separated by linefeeds) 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 linkgit:git-rev-parse[1]. + the "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 on 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