mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Add split description in italia and english and add directory it in levels
This commit is contained in:
parent
943126647b
commit
2c275424a3
104 changed files with 3510 additions and 38 deletions
levels/it/low-level
28
levels/it/low-level/puzzle-precious-blob
Normal file
28
levels/it/low-level/puzzle-precious-blob
Normal file
|
@ -0,0 +1,28 @@
|
|||
[description]
|
||||
|
||||
Create two trees pointing to the same blob!
|
||||
|
||||
[setup]
|
||||
|
||||
[setup goal]
|
||||
|
||||
BLOB=$(echo "I am precious" | git hash-object -w --stdin)
|
||||
git update-index --add --cacheinfo 100644,$BLOB,a
|
||||
git write-tree
|
||||
git update-index --force-remove a
|
||||
git update-index --add --cacheinfo 100644,$BLOB,b
|
||||
git write-tree
|
||||
git update-index --force-remove b
|
||||
|
||||
[win]
|
||||
|
||||
TREES=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep tree | cut -f1 -d" ")
|
||||
|
||||
ALL_TREE_CHILDREN=$(for TREE in $TREES; do
|
||||
git cat-file -p $TREE | cut -f1 | cut -f3 -d" "
|
||||
done)
|
||||
|
||||
NUMBER_OF_CHILDREN=$(echo "$ALL_TREE_CHILDREN" | wc -l)
|
||||
UNIQUE_CHILDREN=$(echo "$ALL_TREE_CHILDREN" | sort -u | wc -l)
|
||||
|
||||
test "$NUMBER_OF_CHILDREN" -gt "$UNIQUE_CHILDREN"
|
Loading…
Add table
Add a link
Reference in a new issue