Re: Understanding pack format

2018-11-06 Thread Duy Nguyen
On Tue, Nov 6, 2018 at 3:23 AM Farhan Khan wrote: > To follow-up from the other day, I have been reading the code that > retrieves the pack entry for the past 3 days now without much success. > But there are quite a few abstractions and I get lost half-way down > the line. Jeff already gave you

Re: Understanding pack format

2018-11-05 Thread Jeff King
On Mon, Nov 05, 2018 at 09:23:45PM -0500, Farhan Khan wrote: > I am trying to identify where the content from a pack comes from. I > traced it back to sha1-file.c:read_object(), which will return the > 'content'. I want to know where the 'content' comes from, which seems > to come from

Re: Understanding pack format

2018-11-05 Thread Farhan Khan
On Fri, Nov 2, 2018 at 12:00 PM Duy Nguyen wrote: > > On Fri, Nov 2, 2018 at 7:19 AM Junio C Hamano wrote: > > > > Farhan Khan 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 >

Re: Understanding pack format

2018-11-02 Thread Duy Nguyen
On Fri, Nov 2, 2018 at 7:19 AM Junio C Hamano wrote: > > Farhan Khan 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 >

Re: Understanding pack format

2018-11-02 Thread Duy Nguyen
On Fri, Nov 2, 2018 at 6:26 AM Farhan Khan wrote: > > Hi all, > > I am trying to understand the pack file format and have been reading > the documentation, specifically https://git-scm.com/docs/pack-format > (which is in git's own git repository as > "Documentation/technical/pack-format.txt"). I

Re: Understanding pack format

2018-11-02 Thread Junio C Hamano
Farhan Khan 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.

Understanding pack format

2018-11-01 Thread Farhan Khan
Hi all, I am trying to understand the pack file format and have been reading the documentation, specifically https://git-scm.com/docs/pack-format (which is in git's own git repository as "Documentation/technical/pack-format.txt"). I see that the file starts with the "PACK" signature, followed by