Re: [PATCH v4 4/4] sha1_name: minimize OID comparisons during disambiguation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 10, 2017, 12:56 UTC
- Message-ID
- <xmqqbmlfp3eh.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171010123634.3hdqxpo6mbl6jhbx@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> OK, I think that makes more sense. But note the p->num_objects thing I > mentioned. If I do: > > git pack-objects .git/objects/pack/pack </dev/null > > then I have a pack with zero objects, which I think we'd similarly want > to return early from. I.e., I think we need: > > if (p->num_objects) > return; > > Technically that also covers open_pack_index() failure, too, but that's > a subtlety I don't think we should rely on.
True. I notice that the early part of the two functions look almost identical. Do we need error condition handling for the other one, too?