public
Description: A bunch of random scripts I've either written, downloaded or clipped from #git.
Homepage:
Clone URL: git://github.com/jwiegley/git-scripts.git
git-scripts / git-all-commits
100755 16 lines (14 sloc) 0.387 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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