mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-24 16:20:08 +01:00
10 lines
369 B
Text
10 lines
369 B
Text
COMMITS=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep commit | cut -f1 -d" ")
|
|
|
|
for COMMIT in $COMMITS; do
|
|
# My first parent's parents has to be the same as my second parent's parent.
|
|
if [ "$(git rev-parse --verify -q $COMMIT^1^)" = "$(git rev-parse --verify -q $COMMIT^2^)" ]; then
|
|
return 0
|
|
fi
|
|
done
|
|
|
|
return 1
|