Skip to content

Instantly share code, notes, and snippets.

@trdthg
Created June 18, 2023 07:34
Show Gist options
  • Save trdthg/defd4c9e4044f3f379f47fee2a31d013 to your computer and use it in GitHub Desktop.
Save trdthg/defd4c9e4044f3f379f47fee2a31d013 to your computer and use it in GitHub Desktop.
#!/bin/bash
LISTS=$(git verify-pack -v .git/objects/pack/pack-*.idx | sort -k 3 -g | tail -5)
for item in ${LISTS}; do
if [ $(expr length ${item}) -eq 40 ]; then
git rev-list --objects --all | grep ${item}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment