Re: [GSoC PATCH v4 6/7] builtin/repack: add guards for --drop-filtered

Siddharth Shrimali <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CAGWgyh8Azg1SKyPGtjai-FLbV5Ngn+dC3kxZgU+0FYFdDoOEVw@mail.gmail.com>
Hey Christian,
On Wed, 12 Aug 2026 at 23:11, Christian Couder
<[email protected]> wrote:
>
> On Mon, Aug 10, 2026 at 7:41 PM Siddharth Shrimali
> <[email protected]> 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
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.