mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-06-20 17:03:09 +02:00
changes to make the game in spanish
This commit is contained in:
parent
9da0bd1fbd
commit
7c24e9b68e
101 changed files with 2073 additions and 2074 deletions
levels/low-level
|
@ -1,38 +1,38 @@
|
|||
[description]
|
||||
[descripción]
|
||||
|
||||
Trees can also point to other trees! This way, they can describe nested directory structures.
|
||||
¡Los árboles también pueden señalar a otros árboles! De esta manera, pueden describir estructuras de directorios anidados.
|
||||
|
||||
When you add a file inside of a directory to the index, and then call `git write-tree`, it will create a nested tree for the directory, and attach the blob to it.
|
||||
Cuando agrega un archivo dentro de un directorio al índice y luego llama a `git write-tree`, creará un árbol anidado para el directorio y le adjuntará el blob.
|
||||
|
||||
To solve this level, build a little stick figure, as shown on the left - a tree that points to two blobs, as well to a tree that points to two blobs.
|
||||
Para resolver este nivel, construye una pequeña figura de palo, como se muestra a la izquierda: un árbol que apunta a dos manchas, así como un árbol que apunta a dos manchas.
|
||||
|
||||
[setup]
|
||||
[configuración]
|
||||
|
||||
[setup goal]
|
||||
[objetivo de configuración]
|
||||
|
||||
echo "I'm the left arm" > arm1
|
||||
echo "I'm the right arm" > arm2
|
||||
mkdir hip
|
||||
echo "I'm the left leg" > hip/leg1
|
||||
echo "I'm the right leg" > hip/leg2
|
||||
git add .
|
||||
git write-tree
|
||||
echo "Soy el brazo izquierdo" > arm1
|
||||
echo "Soy el brazo derecho" > arm2
|
||||
cadera mkdir
|
||||
echo "Soy la pierna izquierda" > cadera/pierna1
|
||||
echo "Soy la pierna derecha" > cadera/pierna2
|
||||
git agregar.
|
||||
árbol de escritura de git
|
||||
|
||||
[win]
|
||||
[ganar]
|
||||
|
||||
TREES=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep tree | cut -f1 -d" ")
|
||||
ÁRBOLES=$(git cat-file --batch-check='%(nombre de objeto) %(tipo de objeto)' --batch-all-objects | árbol grep | cut -f1 -d" ")
|
||||
|
||||
for OUTER_TREE in $TREES; do
|
||||
para OUTER_TREE en $TREES; hacer
|
||||
NUMBER_OF_BLOB_CHILDREN=$(git cat-file -p $OUTER_TREE | cut -f2 -d" " | grep blob | wc -l)
|
||||
NUMBER_OF_TREE_CHILDREN=$(git cat-file -p $OUTER_TREE | cut -f2 -d" " | grep tree | wc -l)
|
||||
NUMBER_OF_TREE_CHILDREN=$(git cat-file -p $OUTER_TREE | cut -f2 -d" " | grep árbol | wc -l)
|
||||
|
||||
if [ $NUMBER_OF_BLOB_CHILDREN -eq 2 -a $NUMBER_OF_TREE_CHILDREN -eq 1 ]; then
|
||||
TREE_CHILD=$(git cat-file -p $OUTER_TREE | cut -f1 | grep tree | cut -d" " -f3)
|
||||
si [ $NUMBER_OF_BLOB_CHILDREN -eq 2 -a $NUMBER_OF_TREE_CHILDREN -eq 1 ]; entonces
|
||||
TREE_CHILD=$(git cat-file -p $OUTER_TREE | cortar -f1 | grep árbol | cortar -d" " -f3)
|
||||
NUMBER_OF_BLOB_CHILDREN_OF_TREE_CHILD=$(git cat-file -p $TREE_CHILD | cut -f2 -d" " | grep blob | wc -l)
|
||||
if [ $NUMBER_OF_BLOB_CHILDREN_OF_TREE_CHILD -eq 2 ]; then
|
||||
return 0
|
||||
si [ $NUMBER_OF_BLOB_CHILDREN_OF_TREE_CHILD -eq 2 ]; entonces
|
||||
regresar 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
hecho
|
||||
|
||||
return 1
|
||||
regresar 1
|
Loading…
Add table
Add a link
Reference in a new issue