Re: [PATCH 18/23] midx: use midx in abbreviation calculations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 7, 2018 at 4:06 PM Derrick Stolee <stolee@xxxxxxxxx> wrote:
> @@ -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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux