Re: [PATCH 09/12] upload-pack: move allow_filter to upload_pack_data
- From
Jeff King <peff@peff.net>
- Date
- May 27, 2020, 18:39 UTC
- Message-ID
- <20200527183956.GG4020820@coredump.intra.peff.net>
- In-Reply-To
- <20200527164742.23067-10-chriscool@tuxfamily.org>
On Wed, May 27, 2020 at 06:47:39PM +0200, Christian Couder wrote:
Show 8 quoted lines
> As we cleanup 'upload-pack.c' by using 'struct upload_pack_data' > more thoroughly, let's move the 'allow_filter' static variable > into this struct. > > It is only used by protocol v0 code since protocol v2 assumes > certain baseline capabilities, but rolling it into > upload_pack_data and just letting v2 code ignore it as it does > now is more coherent and cleaner.
I'm not sure that's true. It should be reflecting the uploadpack.allowfilter config in both cases. This final hunk:
Show 9 quoted lines
> @@ -1329,7 +1331,7 @@ static void process_args(struct packet_reader *request,
> continue;
> }
>
> - if (allow_filter && skip_prefix(arg, "filter ", &p)) {
> + if (data->allow_filter && skip_prefix(arg, "filter ", &p)) {
> list_objects_filter_die_if_populated(&data->filter_options);
> parse_list_objects_filter(&data->filter_options, p);
> continue;is v2 respecting it.
-Peff