Rework levels, and add some new ones

This commit is contained in:
Sebastian Morr 2020-09-15 22:35:14 +02:00
parent 931e9b3beb
commit 35b4dc098a
47 changed files with 163 additions and 39 deletions
levels/blob-remove

View file

@ -0,0 +1,5 @@
There's a simple command to remove all blobs that are not connected to anything:
$ git prune
Remove all blobs in this repository.

1
levels/blob-remove/goal Normal file
View file

@ -0,0 +1 @@
git prune

3
levels/blob-remove/start Normal file
View file

@ -0,0 +1,3 @@
echo "My master password is a1b2c3d4e5" | git hash-object -w --stdin
echo "This blob really should not exist" | git hash-object -w --stdin
echo "This is a virus" | git hash-object -w --stdin

3
levels/blob-remove/win Normal file
View file

@ -0,0 +1,3 @@
OBJECT_COUNT=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | wc -l)
test "$OBJECT_COUNT" -eq 0