-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgit-find-big.sh
executable file
·27 lines (26 loc) · 1.54 KB
/
git-find-big.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 28, July, 2021 //
#// Modified: 31, July, 2021 //
#// file: - //
#// - //
#// Source: https://stackoverflow.com/a/42544963/10152334 //
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////
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