Re: [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]

 



On Fri, May 15, 2020 at 12:04:41PM +0200, Christian Couder wrote:

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

Thanks for following up on this! I think all of the patches here are
moving in a good direction. I think there's a philosophical question
about whether some of the functions should be taking the minimum set of
fields from upload_pack_data, or just the whole struct. But seeing the
opportunities for cleanup near the end, especially around little flags,
I think passing the big struct around (like you've done here) is
probably the best choice.

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

Yeah, I think all of use_thin_pack, use_ofs_delta, etc, should be easy
conversions on top (and will really give us the payoff).

-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