Last active
September 28, 2019 18:25
-
-
Save dpaluy/100bba223c37e6980768f3fa9c4ceda4 to your computer and use it in GitHub Desktop.
This shell script displays all blob objects in the repository, sorted from smallest to largest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git rev-list --objects --all \ | |
| | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \ | |
| | sed -n 's/^blob //p' \ | |
| | sort --numeric-sort --key=2 \ | |
| | cut -c 1-12,41- \ | |
| | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment