oh-my-git/levels/commit-parents/win

11 lines
268 B
Text
Raw Permalink Normal View History

COMMITS=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep commit | cut -f1 -d" ")
for COMMIT in $COMMITS; do
echo a commit named $COMMIT
if [ $(git rev-list $COMMIT | wc -l) -ge 3 ]; then
exit 0
fi
done
exit 1