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

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

 



On 6/9/2018 2:01 PM, Duy Nguyen wrote:
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.

We put all packs _at time of writing_ into the midx. More packs may be added later that are not in the midx. There are tests in t5319-multi-pack-index.sh that verify everything works in this "mixed mode".

It is important that the packfiles are not loaded into the packed_git list if they are managed by the midx.


         for (p = get_packed_git(the_repository); p; p = p->next)
                 find_abbrev_len_for_pack(p, mad);
  }




[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