Re: [PATCH 12/12] receive-pack: avoid duplicates between our refs and alternates

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 12:02:30PM -0800, Junio C Hamano wrote: > > +extract_ref_advertisement () { > > + perl -lne ' > > + # \\ is there to skip capabilities after \0 > > + /push< ([^\\]+)/ or next; > > + exit 0 if $1 eq ""; > > + print $1; > > + '

Re: [PATCH 12/12] receive-pack: avoid duplicates between our refs and alternates

2017-01-25 Thread Junio C Hamano
Jeff King writes: > We de-duplicate ".have" refs among themselves, but never > check if they are duplicates of our local refs. It's not > unreasonable that they would be if we are a "--shared" or > "--reference" clone of a similar repository; we'd have all > the same tags. > > We

[PATCH 12/12] receive-pack: avoid duplicates between our refs and alternates

2017-01-23 Thread Jeff King
We de-duplicate ".have" refs among themselves, but never check if they are duplicates of our local refs. It's not unreasonable that they would be if we are a "--shared" or "--reference" clone of a similar repository; we'd have all the same tags. We can handle this by inserting our local refs into