Created
December 11, 2009 23:12
-
-
Save timcharper/254592 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <commit> <branch>" | |
echo " branch is optimal and defaults to current" | |
exit 1 | |
fi | |
what_ref=$1 | |
branch=$(git symbolic-ref HEAD | sed 's|refs/heads/||') | |
git reflog show $branch@{now} | while read ref rest; do | |
if [ -z "$(git rev-list -1 $ref..$what_ref)" ]; then | |
printf "[x] " | |
else | |
printf "[ ] " | |
fi | |
echo $ref $rest | |
done | less -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment