Understanding last ~28 bytes of index file
- From
Farhan Khan <farhan@farhan.codes>
- Date
- Jun 13, 2019, 06:32 UTC
- Message-ID
- <c7c9012143e0818d332d0a9967c1a3e6@farhan.codes>
Hi all,
I am trying to understand how the index (.git/index) file works. When looking through extensions, it loops until it reaches the last 28 bytes (SHA size + 8). This is referenced here. https://github.com/git/git/blob/master/read-cache.c#L1933 What do the last 28 bytes consist of? Where in the source are bytes written?
I am trying to understand how to reproduce the index file and am not sure how this part works.
Thank you, --- Farhan Khan PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE