[PATCH 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 1

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

 



In the thread started by:

https://lore.kernel.org/git/20200507095829.16894-1-chriscool@xxxxxxxxxxxxx/

which led to the following bug fix commit:

08450ef791 (upload-pack: clear filter_options for each v2 fetch
command, 2020-05-08)

it was agreed that having many static variables in 'upload-pack.c',
while upload_pack_v2() is called more than once per process, is very
bug prone and messy, and that a good way forward would be to use
'struct upload_pack_data' thoroughly, especially in upload_pack()
where it isn't used yet.

This patch series is the first part of an effort in this direction.

While there are still a lot of static variables at the top of
'upload-pack.c' after this patch series, it does a lot of ground work
and a number of cleanups.

This patch series is based on master at 172e8ff696 (The ninth batch,
2020-05-13).

Christian Couder (13):
  upload-pack: remove unused 'wants' from upload_pack_data
  upload-pack: move {want,have}_obj to upload_pack_data
  upload-pack: move 'struct upload_pack_data' around
  upload-pack: use 'struct upload_pack_data' in upload_pack()
  upload-pack: pass upload_pack_data to get_common_commits()
  upload-pack: pass upload_pack_data to receive_needs()
  upload-pack: use upload_pack_data writer in receive_needs()
  upload-pack: move symref to upload_pack_data
  upload-pack: pass upload_pack_data to send_ref()
  upload-pack: pass upload_pack_data to check_non_tip()
  upload-pack: remove static variable 'stateless_rpc'
  upload-pack: pass upload_pack_data to create_pack_file()
  upload-pack: use upload_pack_data fields in receive_needs()

 upload-pack.c | 298 ++++++++++++++++++++++++--------------------------
 1 file changed, 145 insertions(+), 153 deletions(-)

-- 
2.26.2.638.gb2c16ea67b.dirty




[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