Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 19, 2018, 20:10 UTC
- Message-ID
- <xmqqy3inu8qe.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8AbkaSLBYqtFiCwFoqRXguy1hTs=XriefZ3WQJjo_sy8Q@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 5 quoted lines
> There is a difference. For sizes smaller than 2^32, whatever you > pass to oe_set_size() will be returned by oe_size(), > consistently. It does not matter if this size is "good" .... If > it's different, oe_size() will return something else other than > oe_set_size() is given.
OK, fair enough.
> ... I was trying to exercise this > code the other day by reducing size_ field down to 4 bits, and a > couple tests broke but I still don't understand how.
Off by one? Two or more copies of the same objects available whose oe_size() are different?