Re: [PATCH] connect: tighten check for unexpected early hang up (Re: [PATCH v3 2/2] connect: advertized capability is not a ref)

2016-09-08 Thread Junio C Hamano
Jonathan Nieder writes: > Jonathan Nieder wrote: > >> Subject: connect: tighten check for unexpected early hang up > [...] >> @@ -131,7 +131,7 @@ struct ref **get_remote_heads(int in, char *src_buf, >> size_t src_len, >>

Re: [PATCH] connect: tighten check for unexpected early hang up (Re: [PATCH v3 2/2] connect: advertized capability is not a ref)

2016-09-08 Thread Stefan Beller
On Wed, Sep 7, 2016 at 6:45 PM, Jonathan Nieder wrote: > (+cc: Heiko) > Jonathan Nieder wrote: > >> 'die_initial_contact' uses got_at_least_one_head to determine whether >> it was on the first line but code paths added later that use >> 'continue' don't populate it properly

Re: [PATCH v3 2/2] connect: advertized capability is not a ref

2016-09-08 Thread Junio C Hamano
Jonathan Nieder writes: > I think we can make this stricter. The capabilities^{} line is supposed > to be the first advertised ref, before any 'shallow' lines or .have > extra refs. "The first", or "the first and only"? I thought that it would be the latter.

Re: [PATCH] connect: tighten check for unexpected early hang up (Re: [PATCH v3 2/2] connect: advertized capability is not a ref)

2016-09-07 Thread Jonathan Nieder
Jonathan Nieder wrote: > Subject: connect: tighten check for unexpected early hang up [...] > @@ -131,7 +131,7 @@ struct ref **get_remote_heads(int in, char *src_buf, > size_t src_len, > PACKET_READ_GENTLE_ON_EOF | >

Re: [PATCH] connect: tighten check for unexpected early hang up (Re: [PATCH v3 2/2] connect: advertized capability is not a ref)

2016-09-07 Thread Jonathan Nieder
Jonathan Nieder wrote: > Change-Id: I3cec2c160eb6c6f3efdce7dab38a4c78592f6c7f Gah --- sorry about that. Please remove this line if applying (or I'll be happy to resend without it after review). Jonathan

[PATCH] connect: tighten check for unexpected early hang up (Re: [PATCH v3 2/2] connect: advertized capability is not a ref)

2016-09-07 Thread Jonathan Nieder
(+cc: Heiko) Jonathan Nieder wrote: > 'die_initial_contact' uses got_at_least_one_head to determine whether > it was on the first line but code paths added later that use > 'continue' don't populate it properly (see b06dcd7d, 40c155ff, and > 1a7141ff). We could do > > int first_line = 1; >

Re: [PATCH v3 2/2] connect: advertized capability is not a ref

2016-09-07 Thread Jonathan Nieder
Jonathan Tan wrote: > Git advertises the same capabilities^{} ref in its ref advertisement for push > but since it never remembered to do so for fetch, the client forgot to handle > this case. Handle it. The comment in the previous review was that this doesn't describe the history correctly. It

[PATCH v3 2/2] connect: advertized capability is not a ref

2016-09-07 Thread Jonathan Tan
When cloning an empty repository served by standard git, "git clone" produces the following reassuring message: $ git clone git://localhost/tmp/empty Cloning into 'empty'... warning: You appear to have cloned an empty repository. Checking connectivity... done.