]> git.ipfire.org Git - thirdparty/git.git/commit - upload-pack.c
upload-pack: make want_obj not global
authorJonathan Tan <jonathantanmy@google.com>
Thu, 18 Oct 2018 20:43:28 +0000 (13:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Oct 2018 03:04:53 +0000 (12:04 +0900)
commit1d1243fe6328db9b2b045afee9357ab7c6c515f1
tree11e45495d8436d6e1da17922824051c6c4cb4488
parent0b9333ff3ee172669dc3da51afa5fc0aa8e1b114
upload-pack: make want_obj not global

Because upload_pack_v2() can be invoked multiple times in the same
process, the static variable want_obj may not be empty when it is
invoked. To make further analysis of this situation easier, make the
variable local; analysis will be done in a subsequent patch.

The new local variable in upload_pack_v2() is static to preserve
existing behavior; this is not necessary in upload_pack() because
upload_pack() is only invoked once per process.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c