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

Because upload_pack_v2() can be invoked multiple times in the same
process, the static variable have_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