Re: [GSoC PATCH v4 6/7] builtin/repack: add guards for --drop-filtered
- From
Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
- Date
- Aug 12, 2026, 19:45 UTC
- Message-ID
- <CAGWgyh8Azg1SKyPGtjai-FLbV5Ngn+dC3kxZgU+0FYFdDoOEVw@mail.gmail.com>
- In-Reply-To
- <CAP8UFD2ii8C77jWpyHRYG=H7y4t-PFtR5FQB3on4bmB5FQyG4A@mail.gmail.com>
Hey Christian, On Wed, 12 Aug 2026 at 23:11, Christian Couder <christian.couder@gmail.com> wrote:
Show 7 quoted lines
>
> On Mon, Aug 10, 2026 at 7:41 PM Siddharth Shrimali
> <r.siddharth.shrimali@gmail.com> wrote:
> > + die(_("--drop-filtered cannot be used while another operation is in progress"));
>
> Nit: I wonder if something like die_if_some_operation_in_progress()
> from builtin/checkout.c could be used to improve on the error message.die_if_some_operation_in_progress() does check the set of in-progress states, so it is a good fit conceptually, but it is currently "static" in builtin/checkout.c and uses the_repository, whereas the repack guard works on an explicit "repo". If we want to use it, we could extract it to a shared location(wt-status.c), make it non-static, and take a "struct repository *", which does not feel like a part of this series.
So for v5, I will keep the explicit repo-based check but improve the error message, and we could do the extraction as a separate follow-up by first creating a new patch, and then use it with the othr future changes, if that sounds good :)
Thanks, Siddharth Shrimali