Re: [PATCH v14 6/6] branch: add --dry-run for --prune-merged
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Jun 16, 2026, 18:28 UTC
- Message-ID
- <CAHwyqnXjt962HBzcMwRfghiWtv7Wkx6CUxapMv9O9igg27A_fw@mail.gmail.com>
- In-Reply-To
- <7b43a0f1-32a0-40f0-8c82-d2ee78809cc2@gmail.com>
Show 6 quoted lines
> > With --dry-run, --prune-merged prints the local branches it would > > delete, one "Would delete branch <name>" line each, and exits > > without touching any ref. The same filtering applies, so the output > > is exactly the set that the real run would delete. > > I can see this being very useful.
Great to hear and thanks for taking the time to review this! Much appreciated!
Show 8 quoted lines
> > static int prune_merged_branches(int argc, const char **argv, > > - int quiet) > > + int quiet, int dry_run) > > Let's not start adding multiple boolean augments - use a flags argument > like we do for delete_branches() - if you get feedback on one patch you > should think about whether it applies later in the series as well. The > rest of the implementation looks good.
I'm trying to generalize all feedback, but sometimes I miss things. Thanks for pointing it out!
Harald