Re: [PATCH 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 1
- From
Derrick Stolee <stolee@gmail.com>
- Date
- May 15, 2020, 10:43 UTC
- Message-ID
- <2860708f-2719-50b1-f1ae-7fd9c0538c52@gmail.com>
- In-Reply-To
- <20200515100454.14486-1-chriscool@tuxfamily.org>
On 5/15/2020 6:04 AM, Christian Couder wrote:
Show 20 quoted lines
> In the thread started by: > > https://lore.kernel.org/git/20200507095829.16894-1-chriscool@tuxfamily.org/ > > 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.
The patches here are carefully organized to make review easy. Thanks!
I was surprised to see how many local or static variables you were able to remove using members that already existed in 'struct upload_pack_data'. That made the changes here particularly easy to trust.
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Thanks, -Stolee