Re: [PATCH] Handle deltified object correctly in git-*-pull family.
- From
Nicolas Pitre <nico@cam.org>
- Date
- Jun 2, 2005, 21:36 UTC
- Message-ID
- <Pine.LNX.4.63.0506021733520.17354@localhost.localdomain>
- In-Reply-To
- <Pine.LNX.4.63.0506021713330.17354@localhost.localdomain>
On Thu, 2 Jun 2005, Nicolas Pitre wrote:
Show 8 quoted lines
> Here you don't need to call unpack_sha1_rest() at all which would call > xmalloc and another memcpy needlessly. Instead, just use: > > memcpy(base_sha1, hdr + strlen(hdr) + 1, 20); > > and you're done. No need to call an extra free() either. > > And maybe this function should live in delta.c instead?
Forget about my suggestion of moving it to delta.c. Since it assumes knowledge of the object header format it better stay close to the other functions in sha1_file.c.
Nicolas