mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-21 21:01:08 +02:00
Two new low-level levels
This commit is contained in:
parent
d3149784cb
commit
e7914f281d
7 changed files with 48 additions and 0 deletions
levels/commit-rhombus
10
levels/commit-rhombus/win
Normal file
10
levels/commit-rhombus/win
Normal file
|
@ -0,0 +1,10 @@
|
|||
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
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue