Building Git in Elixir — Part 5 (Build Index)
Published in
5 min readApr 1, 2021
In the previous article, I focused on storing nested trees as Merkle trees so that egit can store nested directories. In this article, I will focus on writing building index so that in subsequent articles we can store changes incrementally in repository.
A Bit of Theory
Git Index is used to provide cache of all the blobs representing current state of the project. Git add command uses this information to incrementally save changes in repository. Index file caches a lot of information from filesystem, such as size of…