Re: [PATCH 06/13] upload-pack: pass upload_pack_data to receive_needs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:

> -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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux