From a5bbda8b7b7f25f6caaa9f940e455e702f39766e Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Sat, 19 May 2007 22:08:11 +0200 Subject: Add an option to git-ls-tree to display also the size of blob Add -l/--long option to git-ls-tree command, which displays object size of a blob entry. Object size is placed after object id (left-justified with minimum width of 7 characters). For non-blob entries `-' is used. Rationale: for non-blob entries size of an object has no much meaning, and is not very interesting. Moreover, in planned pack v4 tree objects would be constructed on demand, so tree size would need to be calculated. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- Documentation/git-ls-tree.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index 789939408..ad7f1b920 100644 --- a/Documentation/git-ls-tree.txt +++ b/Documentation/git-ls-tree.txt @@ -9,7 +9,7 @@ git-ls-tree - List the contents of a tree object SYNOPSIS -------- [verse] -'git-ls-tree' [-d] [-r] [-t] [-z] +'git-ls-tree' [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev=[]] [paths...] @@ -36,6 +36,10 @@ OPTIONS Show tree entries even when going to recurse them. Has no effect if '-r' was not passed. '-d' implies '-t'. +-l:: +--long:: + Show object size of blob (file) entries. + -z:: \0 line termination on output. @@ -65,6 +69,14 @@ Output Format When the `-z` option is not used, TAB, LF, and backslash characters in pathnames are represented as `\t`, `\n`, and `\\`, respectively. +When the `-l` option is used, format changes to + + SP SP SP TAB + +Object size identified by is given in bytes, and right-justified +with minimum width of 7 characters. Object size is given only for blobs +(file) entries; for other entries `-` character is used in place of size. + Author ------ -- cgit v1.2.1