From: Stefan Beller Date: Tue, 03 Oct 2017 15:55:16 GMT Subject: Re: [PATCH v3 5/5] sha1_name: Minimize OID comparisons during disambiguation Message-ID: In-Reply-To: <20171002145651.204984-6-dstolee@microsoft.com> > @@ -505,6 +506,65 @@ static int extend_abbrev_len(const struct object_id *oid, void *cb_data) > return 0; > } > > +static void find_abbrev_len_for_pack(struct packed_git *p, > + struct min_abbrev_data *mad) > +{ > + int match = 0; > + uint32_t num, last, first = 0; > + struct object_id oid; > + > + open_pack_index(p); coverity complained here with Calling "open_pack_index" without checking return value (as is done elsewhere 13 out of 15 times). I think the easiest way out is just a if (open_pack_index(p)) die(_("Cannot open existing pack idx file for '%s'"), p); or is there another good approach?