diff options
author | Christian Couder <christian.couder@gmail.com> | 2020-05-08 10:01:15 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-08 11:07:27 -0700 |
commit | 08450ef7918ef2f24bc3bf6afcd1782aa0677015 (patch) | |
tree | 76be7d1f0f210be794103425ebb739ed5fef9f60 /t/t9116-git-svn-log.sh | |
parent | Git 2.26 (diff) | |
download | tgif-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/t9116-git-svn-log.sh')
0 files changed, 0 insertions, 0 deletions