Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2018, 19:36 UTC
- Message-ID
- <xmqq36xp40uk.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <955d9f62d2c8400791501d71c72fea4ef2dc1cff.1528317619.git.jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 8 quoted lines
> -static struct prio_queue rev_list = { compare_commits_by_commit_date };
> -static int non_common_revs, multi_ack, use_sideband;
> +struct data {
> + struct prio_queue rev_list;
> + int non_common_revs;
> +};
> +
> +static int multi_ack, use_sideband;Aside from Brandon's comments, I think passing these throughout the callchain instead of having them as static-globals is a step in the right direction. Could you, however, give the structure a bit more descriptive name, than simply "data"? Anything the computer works on is "data", and there must be something more specific than that about this particular struct ;-)