Re: [External] [RFC PATCH resend] builtin/repack: Honor --keep-pack and .keep when repacking promisor objects

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

 



On Wed, Jan 29, 2025 at 6:12 PM Tomáš Trnka <trnka@xxxxxxx> wrote:
>
> git-repack currently does not pass --keep-pack or --honor-pack-keep to
> the git-pack-objects handling promisor packs. This means that settings
> like gc.bigPackThreshold are completely ignored for promisor packs.
>
> The simple fix is to just copy the keep-pack logic into
> repack_promisor_objects(), although this could possibly be improved by
> making prepare_pack_objects() handle it instead.
>

We repack promisor packs by reading all the objects in promisor packs
(in repack.c), and send them to pack-objects. pack-objects then write a
single pack containing all the promisor objects. The actual old promisor
pack deletion happens in repack.c

So just simply copying the keep-pack logic to repack_promisor_objects()
does not prevent the keep promisor packs from being repacked.

One way to achieve what you wanted would be to filter the keep packs
in repack_promisor_objects's for_each_packed_object().

Thanks.





[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