Re: [PATCH] receive-pack: avoid sending duplicate "have" lines

2015-11-07 Thread Lukas Fleischer
On Sat, 07 Nov 2015 at 00:38:00, Junio C Hamano wrote: > [...] > I suspect that many of these that turn into ".have"s point the same > object as those sit at the tip of our refs (e.g. tags in alternates > we borrow from, which are the folks of the same project that copy > the same tags from the sam

Re: [PATCH] receive-pack: avoid sending duplicate "have" lines

2015-11-06 Thread Junio C Hamano
Lukas Fleischer writes: > @@ -254,9 +255,9 @@ static void write_head_info(void) > struct sha1_array sa = SHA1_ARRAY_INIT; > > for_each_alternate_ref(collect_one_alternate_ref, &sa); > + for_each_ref(show_ref_cb, &sa); > sha1_array_for_each_unique(&sa, show_one_alternate_sh

[PATCH] receive-pack: avoid sending duplicate "have" lines

2015-11-06 Thread Lukas Fleischer
Alternates and refs outside the current namespace are advertised as "have" lines. To this end, the object identifiers of alternates are collected in an array and repeated hashes are omitted before transmission. In contrast, refs outside the used namespace are currently converted into "have" lines a