upload-pack: move pack_objects_hook to upload_pack_data
commit339a9840ef8258a75e07fee640ccceecd20ade31
authorChristian Couder <christian.couder@gmail.com>
Thu, 4 Jun 2020 17:54:50 +0000 (4 19:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Jun 2020 17:58:27 +0000 (4 10:58 -0700)
treea5967190201e20554ee2f22c672e94e9f0af0b9a
parente3835cd4bc6d727bf16a42229c0ca757c088e9d3
upload-pack: move pack_objects_hook to upload_pack_data

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's move the 'pack_objects_hook' static
variable into this struct.

It is used by code common to protocol v0 and protocol v2.

While at it let's also free() it in upload_pack_data_clear().

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c