Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Junio C Hamano
Jonathan Tan writes: > -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

Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Brandon Williams
On 06/06, Jonathan Tan wrote: > 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

[PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-06 Thread Jonathan Tan
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