Re: [RFC PATCH 1/7] builtin/repack.c: add --drop-filtered and --dry-run options

Siddharth Shrimali <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CAGWgyh8rCg0eP6Og31RPRn6oXZ5K09VHtH2UsvMSQs9-CJ=pgg@mail.gmail.com>
Hey Christian,

On Sat, 18 Jul 2026 at 18:01, Christian Couder
<[email protected]> wrote:
> An alternative would be `--drop-filtered[=dry-run]`, which might be
> extended with other `--drop-filtered` specific options later.
>
> I think separating `--dry-run` from `--drop-filtered` like this patch
> does makes sense though if we think that `--dry-run` could be useful
> later without `--drop-filtered`. The fact that a number of other
> commands already have a `--dry-run` option might be a good sign.

Agreed. I chose a separate --dry-run mainly for consistency with the many other
Git commands that already use it that way, and because it leaves room
for --dry-run
to apply to other repack behavior later rather than being tied to
--drop-filtered.

That said, I do like the --drop-filtered[=dry-run] form for keeping future
--drop-filtered-specific options together, and it might end up being the tidier
choice.

Since this is an RFC, I'd genuinely welcome others' thoughts on which one
holds up better in the long run, before settling on any one command-line.

>
> Anyway it would be nice if the commit message explained a bit the
> choice to have a separate `--dry-run` option.

Either way, for v2 I'll add a note to the commit message explaining
the final choice.

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.