pack file object size question

2018-12-16 Thread Farhan Khan
ly need is where the size of the deflated object is identified. Thanks, -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE

Re: pack file object size question

2018-12-16 Thread Farhan Khan
On Sun, Dec 16, 2018 at 5:15 PM Jonathan Nieder wrote: > > Hi, > > Farhan Khan wrote: > > > I am trying to write an implementation of "git index-pack" and having > > a bit of trouble with understanding the ".pack" format. Specifically, > > I am

How DELTA objects values work and are calculated

2019-01-04 Thread Farhan Khan
o Delta objects work? B) Where and how are the sha1 values calculated? I have read Documentation/technical/pack-format.txt, but am still not clear. Thank you! -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE

Re: How DELTA objects values work and are calculated

2019-01-05 Thread Farhan Khan
On 1/4/19 11:46 PM, Duy Nguyen wrote: On Sat, Jan 5, 2019 at 9:49 AM Farhan Khan wrote: Hi all, I'm having trouble understanding how OBJ_REF_DELTA and OBJ_REF_DELTA (deltas) work in git. Where does git calculate the sha1 hash values when doing "git index-pack" in builtin/

Calculate packfile and idxfile checksums

2019-01-17 Thread Farhan Khan
rmine where this value is set. My printf() debugging has it set at pack-write.c:171 (right before the hashwrite call) but it does not seem to be utilized prior to that point. Please assist. Thanks! -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE

Re: Calculate packfile and idxfile checksums

2019-01-18 Thread Farhan Khan
On Fri, Jan 18, 2019 at 3:36 AM Ævar Arnfjörð Bjarmason wrote: > > > On Fri, Jan 18 2019, Farhan Khan wrote: > > > Hi all, > > > > I am trying to understand how git's index-pack works, particularly how > > it calculates the packfile checksum and idxfile c

Understanding last ~28 bytes of index file

2019-06-13 Thread Farhan Khan
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

Understanding DIRC section of .git/index

2019-06-19 Thread Farhan Khan
s that the code does the equivalent of stat() a file, then write the data into the index file. Is this accurate? Is there any htonl() bit rearrangement? What about for the mode or flags? Thanks, --- Farhan Khan PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE

Understanding pack format

2018-11-01 Thread Farhan Khan
re any sample code of how to interpret each entry? Where is this in the git code? That might serve as a good guide. I see a few references to "PACK_SIGNATURE", but not certain which actually reads the data. Thanks! -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE

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 t

Parsing a git HTTP protocol response

2018-11-30 Thread Farhan Khan
be "20" which in decimal is 32, causing the next read to fail. This problem repeats on a few different repositories. Any assistance is welcome, I am very stuck on how the HTTP git protocol works. Thanks, -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE

Understanding Index Header

2018-10-06 Thread Farhan Khan
Number of extensions */ unsigned char extsig[4]; /* Extension signature */ uint32_textsize;/* Size of the extension */ uint8_t sha[8]; /* SHA1 of index before checksum */ } __packed; Am I doing something wrong? Is there some offset or p

Does git load index file into memory?

2018-10-12 Thread Farhan Khan
Hi all, Does git load the entire index file into memory when it wants to edit/view it? I ask because I wonder if this can become a problem with the index file becomes arbitrarily large, like for the Linux kernel. Thanks, -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC

How crc32 value is calculated for deltified objects

2019-03-02 Thread Farhan Khan
calls use(). My question is, does it update the crc32 value with the deltas or just the undeltified object? And if my question implies I do not understand how this process works, can you please explain to me how the crc32 value is constructed? Thank you. --- Farhan Khan PGP Fingerprint: 1312 89CE

Calculating pack file SHA value

2019-03-27 Thread Farhan Khan
he file to stop updating the SHA1 value? I hope my questions are clear. Thanks! --- Farhan Khan PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE

How to determine when to stop receiving pack content

2019-08-10 Thread Farhan Khan
to specify the size or to indicate the end of the pack content. Am I missing something? Thanks --- Farhan Khan PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE

Re: How to determine when to stop receiving pack content

2019-08-11 Thread Farhan Khan
August 11, 2019 11:04 AM, "Pratyush Yadav" wrote: > On 10/08/19 11:47PM, Farhan Khan wrote: > >> Hi, >> >> I am trying to write an implementation of git clone over ssh and am a little >> confused how to >> determine a server response has end