Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 16 lines (14 sloc) 0.387 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/sh

find .git/objects -type f | \
while read file; do
if echo $file | egrep -q '\.idx$'; then
git show-index < $file | awk '{print $2}'
    elif echo $file | egrep -q '[0-9a-f]{38}$'; then
echo $(basename $(dirname $file))$(basename $file)
    fi
done | \
while read hash; do
if [ "$(git cat-file -t $hash)" = commit ]; then
echo $hash
    fi
done
Something went wrong with that request. Please try again.