Update the docs for cat-file command. Some new formatting atoms added because of reusing ref-filter code. Actually, %(rest) is supported for all ref-filter commands, but it has the meaning only for cat-file, that's why I decided to leave it here. Signed-off-by: Olga Telezhnaia <olyatelezhnaya@xxxxxxxxx> --- Documentation/git-cat-file.txt | 38 ++-------------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index 8eca671b8278c..b32fcde802ca1 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -195,28 +195,8 @@ the whole line is considered as an object, as if it were fed to linkgit:git-rev-parse[1]. You can specify the information shown for each object by using a custom -`<format>`. The `<format>` is copied literally to stdout for each -object, with placeholders of the form `%(atom)` expanded, followed by a -newline. The available atoms are: - -`objectname`:: - The 40-hex object name of the object. - -`objecttype`:: - The type of the object (the same as `cat-file -t` reports). - -`objectsize`:: - The size, in bytes, of the object (the same as `cat-file -s` - reports). - -`objectsize:disk`:: - The size, in bytes, that the object takes up on disk. See the - note about on-disk sizes in the `CAVEATS` section below. - -`deltabase`:: - If the object is stored as a delta on-disk, this expands to the - 40-hex sha1 of the delta base object. Otherwise, expands to the - null sha1 (40 zeroes). See `CAVEATS` below. +`<format>`. The format is the same as that of linkgit:git-for-each-ref[1], +with one additional option: `rest`:: If this atom is used in the output string, input lines are split @@ -300,20 +280,6 @@ notdir SP <size> LF is printed when, during symlink resolution, a file is used as a directory name. -CAVEATS -------- - -Note that the sizes of objects on disk are reported accurately, but care -should be taken in drawing conclusions about which refs or objects are -responsible for disk usage. The size of a packed non-delta object may be -much larger than the size of objects which delta against it, but the -choice of which object is the base and which is the delta is arbitrary -and is subject to change during a repack. - -Note also that multiple copies of an object may be present in the object -database; in this case, it is undefined which copy's size or delta base -will be reported. - GIT --- Part of the linkgit:git[1] suite -- https://github.com/git/git/pull/568