Re: heads-up: git-index-pack in "next" is broken
On Tue, 17 Oct 2006 14:47:16 -0400 (EDT) Nicolas Pitre wrote:
Show 16 quoted lines
> On Tue, 17 Oct 2006, Junio C Hamano wrote:
>
> > Nicolas Pitre <nico@cam.org> writes:
> >
> > > Could you instrument the code at the end of
> > > index-pack.c:parse_pack_objects() to display how many deltas were
> > > actually resolved and how many were not? IOW is it a case of all or
> > > nothing, or is there an isolated case of corruption lurking somewhere?
> >
> > fatal: packfile 'pack-ec0c3491753e115e1775256f6b7bd1bce4dea7cd.pack' has
> > 18915 unresolved ref-deltas and 0 ofs-deltas among 21205
>
> Hmmm.... Interesting.
>
> Is it possible that sizeof(union delta_base) might not be equal to 20
> for you?
Yes, on x86_64 this is 24 because of 8-byte alignment for longs:
$ echo 'unsigned x = sizeof(union{unsigned char sha1[20]; long offset;});' | gcc -S -x c -m64 -o - - | grep long
.long 24$ echo 'unsigned x = sizeof(union{unsigned char sha1[20]; long offset;});' | gcc -S -x c -m32 -o - - | grep long
.long 20