From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: khanzf@gmail.com, Git Mailing List <git@vger.kernel.org>
Subject: Re: Understanding pack format
Date: Fri, 2 Nov 2018 17:00:21 +0100 [thread overview]
Message-ID: <CACsJy8DFUeEddSa2z4VTSqhaUBJ4+SUf8xvjh6iWY2Phhh96iQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqlg6covi6.fsf@gitster-ct.c.googlers.com>
On Fri, Nov 2, 2018 at 7:19 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> Farhan Khan <khanzf@gmail.com> writes:
>
> > ...Where is this in the git code? That might
> > serve as a good guide.
>
> There are two major codepaths. One is used at runtime, giving us
> random access into the packfile with the help with .idx file. The
> other is used when receiving a new packstream to create an .idx
> file.
The third path is copying/reusing objects in
builtin/pack-objects.c::write_reuse_object(). Since it's mostly
encoding the header of new objects in pack, it could also be a good
starting point. Then you can move to write_no_reuse_object() and get
how the data is encoded, deltified or not (yeah not parsed, but I
think it's more or less the same thing conceptually).
--
Duy
next prev parent reply other threads:[~2018-11-02 16:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 5:23 Understanding pack format Farhan Khan
2018-11-02 6:15 ` Junio C Hamano
2018-11-02 16:00 ` Duy Nguyen [this message]
2018-11-06 2:23 ` Farhan Khan
2018-11-06 6:09 ` Jeff King
2018-11-06 16:06 ` Duy Nguyen
2018-11-02 15:54 ` Duy Nguyen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACsJy8DFUeEddSa2z4VTSqhaUBJ4+SUf8xvjh6iWY2Phhh96iQ@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=khanzf@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).