Re: [PATCH 18/23] midx: use midx in abbreviation calculations
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 9, 2018, 18:01 UTC
- Message-ID
- <CACsJy8BQ5xxhQ8L9K84KO2EkYELsKKKkdJ0mvc8p427sA8bapQ@mail.gmail.com>
- In-Reply-To
- <20180607140338.32440-19-dstolee@microsoft.com>
On Thu, Jun 7, 2018 at 4:06 PM Derrick Stolee <stolee@gmail.com> wrote:
Show 9 quoted lines
> @@ -565,8 +632,11 @@ static void find_abbrev_len_for_pack(struct packed_git *p,
>
> static void find_abbrev_len_packed(struct min_abbrev_data *mad)
> {
> + struct midxed_git *m;
> struct packed_git *p;
>
> + for (m = get_midxed_git(the_repository); m; m = m->next)
> + find_abbrev_len_for_midx(m, mad);If all the packs are in midx, we don't need to run the second loop below, do we? Otherwise I don't see why we waste cycles on finding abbrev length on midx at all.
> for (p = get_packed_git(the_repository); p; p = p->next) > find_abbrev_len_for_pack(p, mad); > }
-- Duy