From: Jeff King Date: Wed, 27 May 2020 18:36:16 GMT Subject: Re: [PATCH 07/12] upload-pack: pass upload_pack_data to upload_pack_config() Message-ID: <20200527183616.GE4020820@coredump.intra.peff.net> In-Reply-To: <20200527164742.23067-8-chriscool@tuxfamily.org> On Wed, May 27, 2020 at 06:47:37PM +0200, Christian Couder wrote: > As we cleanup 'upload-pack.c' by using 'struct upload_pack_data' > more thoroughly, let's pass that struct to upload_pack_config(), > so that this function can use all the fields of the struct. > > This will be used in followup commits to move static variables > that are set in upload_pack_config() into 'upload_pack_data'. Makes sense... > @@ -1153,10 +1153,10 @@ void upload_pack(struct upload_pack_options *options) > struct packet_reader reader; > struct upload_pack_data data; > > - git_config(upload_pack_config, NULL); > - > upload_pack_data_init(&data); > > + git_config(upload_pack_config, &data); > + ...and we know there can't be any init-time dependency issues with this reordering, because the original could not have accessed &data at all. Looks good. -Peff