Re: [PATCH v2] repack: do not rebuild packs on --dry-run
- From
Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
- Date
- Oct 16, 2026, 18:15 UTC
- Message-ID
- <CAGWgyh-drgvmGzt9dKB6cijA+9YJjvpxNWSqKho135_rvL5MCw@mail.gmail.com>
- In-Reply-To
- <as4WY96-KXQT_PTc@pks.im>
Hi Patrick, Sorry for the late reply, I was a bit occupied with my university work.
On Tue, 13 Oct 2026 at 17:00, Patrick Steinhardt <ps@pks.im> wrote:
Show 7 quoted lines
> Okay, makes sense. I wonder though, we later have a check like this:
>
> if (pack_everything & ALL_INTO_ONE) {
> repack_promisor_objects(repo, &po_args, &names, packtmp,
> (drop_filtered && !dry_run) ? &drop_oids : NULL);
>
> Is the `!dry_run` check redundant now because of the above early exit?oh yes, now that we have an early exit, a dry run never gets past the candidate listing, so dry_run is always false by the time we reach repack_promisor_objects(). the same applies to the earlier
if (!dry_run)
delete_redundant = 1;since nothing reads delete_redundant before the early exit
I will drop both checks in v3.
Thanks, Siddharth