git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Patrick SteinhardtNext: Siddharth Shrimali
Message 10 of 14 in “repack: do not rebuild packs on --dry-run”
  1. repack: do not rebuild packs on --dry-runSiddharth Shrimali, Oct 8, 2026
  2. D. Ben KnobleOct 8, 2026
  3. Siddharth ShrimaliOct 10, 2026
  4. Junio C HamanoOct 8, 2026
  5. Siddharth ShrimaliOct 10, 2026
  6. repack: do not rebuild packs on --dry-runSiddharth Shrimali, Oct 10, 2026
  7. Ben KnobleOct 10, 2026
  8. Junio C HamanoOct 11, 2026
  9. Patrick SteinhardtOct 13, 2026
  10. Siddharth ShrimaliOct 16, 2026
  11. repack: do not rebuild packs on --dry-runSiddharth Shrimali, Oct 16, 2026
  12. Junio C HamanoOct 16, 2026
  13. Siddharth ShrimaliOct 17, 2026
  14. Patrick SteinhardtOct 19, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.