Browse Source
This counts the number of unpacked object files and disk space consumed by them, to help you decide when it is a good time to repack. Signed-off-by: Junio C Hamano <junkio@cox.net>maint
Junio C Hamano
20 years ago
2 changed files with 15 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
. git-sh-setup-script |
||||||
|
|
||||||
|
echo $(find "$GIT_DIR/objects"/?? -type f -print | wc -l) objects, \ |
||||||
|
$({ |
||||||
|
echo 0 |
||||||
|
# "no-such" is to help Darwin folks by not using xargs -r. |
||||||
|
find "$GIT_DIR/objects"/?? -type f -print 2>/dev/null | |
||||||
|
xargs du -k "$GIT_DIR/objects/no-such" 2>/dev/null | |
||||||
|
sed -e 's/[ ].*/ +/' |
||||||
|
echo p |
||||||
|
} | dc) kilobytes |
Loading…
Reference in new issue