add large-git function
This commit is contained in:
parent
169356954e
commit
7f57b5f175
1 changed files with 10 additions and 0 deletions
10
home/private_dot_config/zsh/functions/large-git
Normal file
10
home/private_dot_config/zsh/functions/large-git
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in a new issue