Re: [PATCH 07/12] upload-pack: pass upload_pack_data to upload_pack_config()
- From
Jeff King <peff@peff.net>
- Date
- May 27, 2020, 18:36 UTC
- 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:
Show 6 quoted lines
> 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...
Show 10 quoted lines
> @@ -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