Show me your code and conceal your data structures, and I shall continue to be
mystified. Show me your data structures, and I won't need your code.
- Base de datos llave-valor donde la llave es el SHA1 del objeto.
- 4 tipos de objetos blob, tree, commit y tag
- Las referencias estan en el directorio .git/refs/
- Por ejemplo .git/refs/heads/ o .git/refs/remotes/origin
git cat-file -p a6443f6374e2f3d01428b34f5fe5995aad821ad4
#+RESULTS
git cat-file -p c128c4eb610f237215632ca152e13dfe3b555963
git cat-file -p cf0bb96e8dd3c93a113d13edb170a1e793b4f46e
The tag object is very much like a commit object – it contains a tagger, a date, a message, and a pointer. The main difference is that a tag object generally points to a commit rather than a tree
git cat-file -p c92ab76574cb7ed2b1db4d4778f38deda9cbd752
Para evitar llegar al limite de 31998 subdirectorios por directorio de ext3, las dos primeras letras del hash en base64 son un directorio.
- No content duplication
- Oblivious to Rename
“Irmin is a library for persistent stores with built-in snapshot, branching and reverting mechanisms. It is designed to use a large variety of backends.”
Una interfaz de Git db.
- In-memory Database
- Git-repo filesystem
- filesystem
- REST API
- Persistencia
- Historial del estado del ‘objeto’
- Transacciones con operaciones ‘merge’ a medida
- Visualizar el historial con herramientas hechas para git (e.j. gitk)
¿Preguntas?