]> git.ipfire.org Git - thirdparty/git.git/commit
fetch-pack: make negotiation-related vars local
authorJonathan Tan <jonathantanmy@google.com>
Thu, 14 Jun 2018 22:54:26 +0000 (15:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jun 2018 15:44:23 +0000 (08:44 -0700)
commitd30fe89c37b746ac2f3419ae0e3990a9984fb4cf
treec2e808a15dd4b9710c2586410b3d538c678b2ce5
parentaf1c90d13eb325b3fb7b6913757882b663caf1c6
fetch-pack: make negotiation-related vars local

Reduce the number of global variables by making the priority queue and
the count of non-common commits in it local, passing them as a struct to
various functions where necessary.

This also helps in the case that fetch_pack() is invoked twice in the
same process (when tag following is required when using a transport that
does not support tag following), in that different priority queues will
now be used in each invocation, instead of reusing the possibly
non-empty one.

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