mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Convert "internal" levels to new level format
This commit is contained in:
parent
613b1b9852
commit
53a6885ef9
108 changed files with 727 additions and 382 deletions
levels/internals
44
levels/internals/puzzle-apocalypse
Normal file
44
levels/internals/puzzle-apocalypse
Normal file
|
@ -0,0 +1,44 @@
|
|||
[description]
|
||||
|
||||
Delete all objects in this repository using git commands only!
|
||||
|
||||
Useful commands:
|
||||
|
||||
git prune
|
||||
git fsck
|
||||
git reflog expire
|
||||
|
||||
Note: I'm not sure how to beat this level. :D
|
||||
|
||||
[setup]
|
||||
|
||||
echo foo > foo
|
||||
BLOB=$(git hash-object -w foo)
|
||||
echo bar > bar
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
echo blabber >> bar
|
||||
git commit -a -m "Second commit"
|
||||
git update-ref refs/important HEAD
|
||||
git update-ref refs/interesting "$BLOB"
|
||||
|
||||
[setup goal]
|
||||
|
||||
echo foo > foo
|
||||
BLOB=$(git hash-object -w foo)
|
||||
echo bar > bar
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
echo blabber >> bar
|
||||
git commit -a -m "Second commit"
|
||||
git update-ref refs/important HEAD
|
||||
git update-ref refs/interesting "$BLOB"
|
||||
|
||||
TREE=$(git mktree)
|
||||
git read-tree $TREE
|
||||
rm -rf .git/refs/*
|
||||
rm -rf .git/objects/*
|
||||
|
||||
[win]
|
||||
|
||||
test "$(git cat-file --batch-check --batch-all-objects | wc -l)" -eq 0
|
|
@ -1,9 +0,0 @@
|
|||
Delete all objects in this repository using git commands only!
|
||||
|
||||
Useful commands:
|
||||
|
||||
git prune
|
||||
git fsck
|
||||
git reflog expire
|
||||
|
||||
Note: I'm not sure how to beat this level. :D
|
|
@ -1,4 +0,0 @@
|
|||
TREE=$(git mktree)
|
||||
git read-tree $TREE
|
||||
rm -rf .git/refs/*
|
||||
rm -rf .git/objects/*
|
|
@ -1,9 +0,0 @@
|
|||
echo foo > foo
|
||||
BLOB=$(git hash-object -w foo)
|
||||
echo bar > bar
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
echo blabber >> bar
|
||||
git commit -a -m "Second commit"
|
||||
git update-ref refs/important HEAD
|
||||
git update-ref refs/interesting "$BLOB"
|
|
@ -1 +0,0 @@
|
|||
test "$(git cat-file --batch-check --batch-all-objects | wc -l)" -eq 0
|
Loading…
Add table
Add a link
Reference in a new issue