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

Re: [PATCH] repack: do not rebuild packs on --dry-run

From
Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
Date
Oct 10, 2026, 19:53 UTC
Message-ID
<CAGWgyh9Qo9J6A+PWpwiZoZPQXDv+fgwRkPKT-bZbywWZgjO9sg@mail.gmail.com>
In-Reply-To
<CALnO6CD9roPhKsYRVXRuZXQckTmbCskKmvxiUyxp6vkJ03S8rQ@mail.gmail.com>
Hi Ben,
On Thu, 8 Oct 2026 at 18:26, D. Ben Knoble <ben.knoble@gmail.com> wrote:
> Just outside the patch context is the "if (dry_run)" conditional, so
> this is the right place. (In this case, formatting with a larger "-U"
> value might help.)
Thanks, Ben! I will do that in v2
Show 19 quoted lines
> > +
> > +                       /*
> > +                        * add an exit here, so that dry run does not
> > +                        * go on to rebuild any pack or delete anything, even
> > +                        * if the user explicitly asked for -d
> > +                        */
>
> 2 notes:
>
> 1. "add an exit" will stop making sense as soon as the patch becomes a
> commit; that is, it only makes sense in the context of proposed
> changes. Once those changes are part of the code base, the comment and
> code are not adding anything. They simply are. So, if we need a
> comment (see 2), it might be best phrased as "exit here so that […]",
> keeping some of your original wording. Or we could be more terse:
> "skip non-dry-run operations" or something.
> 2. Do we need such a comment, I wonder? git-blame will point folks
> towards this commit :)
>

Oh yeah right, it will stop making sense without any context. Yeah git blame does the thing, but I feel like adding a short comment for that

Will send a v2 soon

Thanks, Siddharth

Previous: D. Ben KnobleNext: Junio C Hamano
Message 3 of 7 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

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.