Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/.venv
Google/gd-files-del/Pipfile.lock
21 changes: 12 additions & 9 deletions Development/git-find-big.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@
IFS=$'\n';

# list all objects including their size, sort by size, take top 10
objects=`git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head`
objects=$(git verify-pack -v .git/objects/pack/pack-*.idx \
| grep -v chain \
| sort -k3nr | head)

echo "All sizes are in kB's. The pack column is the size of the object, compressed, inside the pack file."

output="size,pack,SHA,location"
for y in $objects
for y in $=objects
do
# extract the size in bytes
size=$((`echo $y | cut -f 5 -d ' '`/1024))
size=$(($(echo $y | cut -f 5 -d ' ')/1024))
# extract the compressed size in bytes
compressedSize=$((`echo $y | cut -f 6 -d ' '`/1024))
compressedSize=$(($(echo $y | cut -f 6 -d ' ')/1024))
# extract the SHA
sha=`echo $y | cut -f 1 -d ' '`
sha=$(echo $y | cut -f 1 -d ' ')
# find the objects location in the repository tree
other=`git rev-list --all --objects | grep $sha`
#lineBreak=`echo -e "\n"`
output="${output}\n${size},${compressedSize},${other}"
other=$(git rev-list --all --objects \
| grep "$sha" \
| cut -f 2- -d ' ')
output="${output}\n${size},${compressedSize},${sha},${other}"
done

echo -e $output | column -t -s ', '
echo -e "$output" | column -t -s ','
157 changes: 88 additions & 69 deletions Google/gd-files-del/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.