Re: [PATCH v2 05/14] object-name: move logic to iterate through packed prefixed objects
Patrick Steinhardt <ps@pks.im> writes:
Show 17 quoted lines
> +static int for_each_prefixed_object_in_pack(
> + struct packfile_store *store,
> + struct packed_git *p,
> + const struct odb_for_each_object_options *opts,
> + struct packfile_store_for_each_object_wrapper_data *data)
> +{
> + uint32_t num, i, first = 0;
> + int len = opts->prefix_hex_len > p->repo->hash_algo->hexsz ?
> + p->repo->hash_algo->hexsz : opts->prefix_hex_len;
> + int ret;
> +
> + num = p->num_objects;
> + bsearch_pack(opts->prefix, p, &first);
> +
> + /*
> + * At this point, "first" is the location of the lowest object
> + * with an object name that could match "bin_pfx". See if we have"bin_pfx" isn't used no more, should be "opts->prefix".
--
Cheers,
Toon