mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-07 05:02:04 +02:00
Write win scripts for all levels (with a short, fun trip to quote hell)
This commit is contained in:
parent
2aefdf8391
commit
7c82381e8d
9 changed files with 50 additions and 18 deletions
|
@ -1,7 +1,3 @@
|
|||
BLOB_COUNT=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep blob | wc -l)
|
||||
|
||||
if [ "$BLOB_COUNT" -gt 2 ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
test "$BLOB_COUNT" -gt 2
|
||||
|
|
1
levels/02-tree/win
Normal file
1
levels/02-tree/win
Normal file
|
@ -0,0 +1 @@
|
|||
git cat-file -p c099013035060f20e8d8f5db69e158213fbec519
|
3
levels/03-commit/win
Normal file
3
levels/03-commit/win
Normal file
|
@ -0,0 +1,3 @@
|
|||
COMMIT_COUNT=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep commit | wc -l)
|
||||
|
||||
test "$COMMIT_COUNT" -gt 0
|
10
levels/04-parents/win
Normal file
10
levels/04-parents/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
|
||||
echo a commit named $COMMIT
|
||||
if [ $(git rev-list $COMMIT | wc -l) -ge 3 ]; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue