Restructuring of goal/start scripts

This commit is contained in:
bleeptrack 2020-09-15 12:36:22 +02:00
parent 34b24344d4
commit b84bb48004
11 changed files with 35 additions and 41 deletions
levels
02-tree
03-commit
04-parents
05-ref
06-symref

View file

@ -1,4 +1,3 @@
echo 'meow' > noises
git update-index --add noises
git write-tree

View file

@ -1,7 +1 @@
touch empty_file
git add .
git write-tree
git commit-tree 3185 -m 'Clever commit message'
rm empty_file
git update-index --remove empty_file

View file

@ -1,4 +1,3 @@
git write-tree
FIRST_COMMIT=$(git commit-tree 4b82 -m 'First commit :O')
SECOND_COMMIT=$(git commit-tree 4b82 -p $FIRST_COMMIT -m 'Second commit :D')
THIRD_COMMIT=$(git commit-tree 4b82 -p $SECOND_COMMIT -m 'Third commit \o/')

View file

@ -1,10 +1,3 @@
echo hello > hello
echo world > world
BLOB1=$(git hash-object -w hello)
BLOB2=$(git hash-object -w world)
git add .
TREE=$(git write-tree)
COMMIT=$(git commit-tree $TREE -m "Initial commit")
git update-ref refs/a $BLOB1
git update-ref refs/b $BLOB2
git update-ref refs/c $TREE

View file

@ -1,5 +1,7 @@
echo hello > hello
echo world > world
BLOB1=$(git hash-object -w hello)
BLOB2=$(git hash-object -w world)
git add .
TREE=$(git write-tree)
git commit-tree $TREE -m "Initial commit"
COMMIT=$(git commit-tree $TREE -m "Initial commit")

View file

@ -1,5 +1 @@
TREE=$(git write-tree)
COMMIT=$(git commit-tree $TREE -m "Initial commit")
git update-ref refs/best_commit $COMMIT
git update-ref refs/worst_commit $COMMIT
git symbolic-ref HEAD refs/best_commit