Re: [PATCH 06/13] upload-pack: pass upload_pack_data to receive_needs()
- From
Jeff King <peff@peff.net>
- Date
- May 15, 2020, 18:20 UTC
- Message-ID
- <20200515182022.GF3692649@coredump.intra.peff.net>
- In-Reply-To
- <20200515100454.14486-7-chriscool@tuxfamily.org>
On Fri, May 15, 2020 at 12:04:47PM +0200, Christian Couder wrote:
> As we cleanup 'upload-pack.c' by using 'struct upload_pack_data' > more thoroughly, let's pass 'struct upload_pack_data' to > receive_needs(), so that this function and the functions it > calls can use all the fields of that struct in followup commits.
This is a similar case to the get_common_commits() one, where we replace specific options with the big struct:
Show 5 quoted lines
> -static void receive_needs(struct packet_reader *reader, > - struct object_array *want_obj, > - struct list_objects_filter_options *filter_options) > +static void receive_needs(struct upload_pack_data *data, > + struct packet_reader *reader)
...except that we _do_ later make more use of the big struct. So it makes sense to me here (and perhaps that also argues that get_common_commits() should take the big struct as you did, so that all of these big helper functions have access to it).
-Peff