From: "Farhan Khan" <farhan@farhan.codes>
To: git@vger.kernel.org
Subject: Understanding last ~28 bytes of index file
Date: Thu, 13 Jun 2019 06:32:03 +0000 [thread overview]
Message-ID: <c7c9012143e0818d332d0a9967c1a3e6@farhan.codes> (raw)
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
next reply other threads:[~2019-06-13 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 6:32 Farhan Khan [this message]
2019-06-13 17:09 ` Understanding last ~28 bytes of index file Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c7c9012143e0818d332d0a9967c1a3e6@farhan.codes \
--to=farhan@farhan.codes \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).