> @@ -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?