Re: [RFC PATCH 1/7] builtin/repack.c: add --drop-filtered and --dry-run options
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jul 18, 2026, 12:30 UTC
- Message-ID
- <CAP8UFD2ZNmWh4fjh+vFvKCihfebg2yif9=xLjqpKZFgF-O0RSg@mail.gmail.com>
- In-Reply-To
- <20260716132848.95982-2-r.siddharth.shrimali@gmail.com>
On Thu, Jul 16, 2026 at 3:29 PM Siddharth Shrimali <r.siddharth.shrimali@gmail.com> wrote:
Show 8 quoted lines
> > Add two new command-line options to 'git-repack': > > --drop-filtered: intended to eventually delete objects that match > the filter specification. Requires --filter and -a, > and is incompatible with --filter-to. > --dry-run: show which objects would be dropped without making any > changes. Only meaningful with --drop-filtered.
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.
Anyway it would be nice if the commit message explained a bit the choice to have a separate `--dry-run` option.