Building Git in Elixir — Part 4 (Store Nested Trees as Merkle Tree)
Published in
5 min readMar 25, 2021
In the previous article, I focused on making history and storing executables in repository. In this article, I will focus on storing nested directories in repository by building nested trees as Merkle trees[5].
A Bit of Theory
Git stores nested directories as nested trees and each tree is a Merkle tree. From wikipedia definition of Merkle tree —
“a hash tree or Merkle tree is a tree in which every leaf node is labelled…