Skip to content

Instantly share code, notes, and snippets.

@beyondlimits
Created June 20, 2020 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beyondlimits/413526d008a92ba3fba73c9f0204e8a3 to your computer and use it in GitHub Desktop.
Save beyondlimits/413526d008a92ba3fba73c9f0204e8a3 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
shopt -s nullglob extglob
cd "`git rev-parse --git-path objects`"
# packed objects
for p in pack/pack-*([0-9a-f]).idx ; do
git show-index < $p | cut -f 2 -d ' '
done
# loose objects
for o in [0-9a-f][0-9a-f]/*([0-9a-f]) ; do
echo ${o/\/}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment