Write win scripts for all levels (with a short, fun trip to quote hell)

This commit is contained in:
Sebastian Morr 2020-09-11 12:23:26 +02:00
parent 2aefdf8391
commit 7c82381e8d
9 changed files with 50 additions and 18 deletions
levels/04-parents

10
levels/04-parents/win Normal file
View 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
echo a commit named $COMMIT
if [ $(git rev-list $COMMIT | wc -l) -ge 3 ]; then
exit 0
fi
done
exit 1