mirror of
https://github.com/captn3m0/Scripts.git
synced 2024-09-27 22:22:53 +00:00
16 lines
391 B
Bash
Executable File
16 lines
391 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# work over each commit and append all files in tree to $tempFile
|
|
tempFile=$(mktemp)
|
|
IFS=$'\n'
|
|
for commitSHA1 in $(git rev-list --all); do
|
|
git ls-tree -r --long "$commitSHA1" >>"$tempFile"
|
|
done
|
|
|
|
# sort files by SHA1, de-dupe list and finally re-sort by filesize
|
|
sort --key 3 "$tempFile" | \
|
|
uniq | \
|
|
sort --key 4 --numeric-sort --reverse
|
|
|
|
# remove temp file
|
|
rm "$tempFile" |