summaryrefslogtreecommitdiff
path: root/t/t0212
diff options
context:
space:
mode:
authorLibravatar Christian Couder <christian.couder@gmail.com>2020-05-08 10:01:15 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-08 11:07:27 -0700
commit08450ef7918ef2f24bc3bf6afcd1782aa0677015 (patch)
tree76be7d1f0f210be794103425ebb739ed5fef9f60 /t/t0212
parentGit 2.26 (diff)
downloadtgif-08450ef7918ef2f24bc3bf6afcd1782aa0677015.tar.xz
upload-pack: clear filter_options for each v2 fetch command
Because of the request/response model of protocol v2, the upload_pack_v2() function is sometimes called twice in the same process, while 'struct list_objects_filter_options filter_options' was declared as static at the beginning of 'upload-pack.c'. This made the check in list_objects_filter_die_if_populated(), which is called by process_args(), fail the second time upload_pack_v2() is called, as filter_options had already been populated the first time. To fix that, filter_options is not static any more. It's now owned directly by upload_pack(). It's now also part of 'struct upload_pack_data', so that it's owned indirectly by upload_pack_v2(). In the long term, the goal is to also have upload_pack() use 'struct upload_pack_data', so adding filter_options to this struct makes more sense than to have it owned directly by upload_pack_v2(). This fixes the first of the 2 bugs documented by d0badf8797 (partial-clone: demonstrate bugs in partial fetch, 2020-02-21). Helped-by: Derrick Stolee <dstolee@microsoft.com> Helped-by: Jeff King <peff@peff.net> Helped-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0212')
0 files changed, 0 insertions, 0 deletions