Staging
v0.5.1
swh:1:snp:c5feb7ee9221a3820c8879e85e8a18470c0b3afa
Raw File
Tip revision: 541ad6e2a9cfd71dc1e4131fb2b47e3c630417ed authored by Junio C Hamano on 01 August 2005, 22:19:34 UTC
GIT 0.99.3
Tip revision: 541ad6e
git-count-objects-script
#!/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
back to top