Thread (12 messages) 12 messages, 3 authors, 3d ago

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

From: Siddharth Shrimali <hidden>
Date: 2026-07-20 10:20:05

Hey Christian,

On Sat, 18 Jul 2026 at 18:01, Christian Couder
[off-list ref] 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!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help