aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/rev-list-options.txt
diff options
context:
space:
mode:
authorLi Linchao <lilinchao@oschina.cn>2022-08-11 04:47:54 +0000
committerJunio C Hamano <gitster@pobox.com>2022-08-11 13:45:23 -0700
commit9096451acdf065c3dbcf609dcefe51cd68aa5d1e (patch)
tree4df703b0f464aa042bb3b4f590d215f55bcf13ec /Documentation/rev-list-options.txt
parent5502f77b6944eda8e26813d8f542cffe7d110aea (diff)
downloadgit-9096451acdf065c3dbcf609dcefe51cd68aa5d1e.tar.gz
rev-list: support human-readable output for `--disk-usage`
The '--disk-usage' option for git-rev-list was introduced in 16950f8384 (rev-list: add --disk-usage option for calculating disk usage, 2021-02-09). This is very useful for people inspect their git repo's objects usage infomation, but the resulting number is quit hard for a human to read. Teach git rev-list to output a human readable result when using '--disk-usage'. Signed-off-by: Li Linchao <lilinchao@oschina.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/rev-list-options.txt')
-rw-r--r--Documentation/rev-list-options.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 195e74eec6..bd08d18576 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -242,6 +242,7 @@ ifdef::git-rev-list[]
to `/dev/null` as the output does not have to be formatted.
--disk-usage::
+--disk-usage=human::
Suppress normal output; instead, print the sum of the bytes used
for on-disk storage by the selected commits or objects. This is
equivalent to piping the output into `git cat-file
@@ -249,6 +250,8 @@ ifdef::git-rev-list[]
faster (especially with `--use-bitmap-index`). See the `CAVEATS`
section in linkgit:git-cat-file[1] for the limitations of what
"on-disk storage" means.
+ With the optional value `human`, on-disk storage size is shown
+ in human-readable string(e.g. 12.24 Kib, 3.50 Mib).
endif::git-rev-list[]
--cherry-mark::