fetch-pack: drop static advertise_sid variable
write_fetch_command_and_capabilities() is moved to 'connect.c' in a subsequent commit. To prepare for that, drop the static variable usage of advertise_sid. Currently advertise_sid is used in two places: 1. In function do_fetch_pack(): if (!server_supports("session-id")) advertise_sid = 0; 2. In function fetch_pack_config(): repo_config_get_bool("transfer.advertisesid", &advertise_sid); About 1, it is only relevant for v0/v1 protocol, move it into find_common(). About 2, call repo_config_get_bool() inside of write_fetch_command_and_capabilities() and find_common() replacing the static variable. Because repo_config_get_bool() leaves advertise_sid as is if it is not set, initialize it to 0 matching its default. Helped-by: Jonathan Tan <jonathantanmy@google.com> Helped-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Calvin Wan <calvinwan@google.com> Signed-off-by: Eric Ju <eric.peijian@gmail.com> Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>