From: Patrick Steinhardt Date: Wed, 02 Apr 2025 11:13:29 GMT Subject: Re: [PATCH v2 02/10] builtin/cat-file: wire up an option to filter objects Message-ID: In-Reply-To: <87r02cf6l1.fsf@iotcl.com> On Tue, Apr 01, 2025 at 01:45:46PM +0200, Toon Claes wrote: > Patrick Steinhardt writes: > > diff --git a/builtin/cat-file.c b/builtin/cat-file.c > > index 8e40016dd24..940900d92ad 100644 > > --- a/builtin/cat-file.c > > +++ b/builtin/cat-file.c > > @@ -1000,6 +1013,8 @@ int cmd_cat_file(int argc, > > N_("run filters on object's content"), 'w'), > > OPT_STRING(0, "path", &force_path, N_("blob|tree"), > > N_("use a for (--textconv | --filters); Not with 'batch'")), > > + OPT_CALLBACK(0, "filter", &batch.objects_filter, N_("args"), > > + N_("object filtering"), opt_parse_list_objects_filter), > > Because we've decided on `--filter` we can use > `OPT_PARSE_LIST_OBJECTS_FILTER` here now. Ah, indeed, well-spotted. Patrick