Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-29 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Junio C Hamano writes: > > >> +enum protocol_version determine_protocol_version_server(void) > >> +{ > >> + const char *git_protocol = getenv(GIT_PROTOCOL_ENVIRONMENT); > >> + enum protocol_version version = protocol_v0; > >> + > >> + if

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-28 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > > +`GIT_PROTOCOL`:: > > + For internal use only. Used in handshaking the wire protocol. > > + Contains a colon ':' separated list of keys with optional values > > + 'key[=value]'. Presence of unknown keys

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-28 Thread Brandon Williams
On 09/26, Stefan Beller wrote: > > +extern enum protocol_version get_protocol_version_config(void); > > +extern enum protocol_version determine_protocol_version_server(void); > > +extern enum protocol_version determine_protocol_version_client(const char > > *server_response); > > It would be

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-27 Thread Junio C Hamano
Junio C Hamano writes: >> +enum protocol_version determine_protocol_version_server(void) >> +{ >> +const char *git_protocol = getenv(GIT_PROTOCOL_ENVIRONMENT); >> +enum protocol_version version = protocol_v0; >> + >> +if (git_protocol) { >> +struct

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-27 Thread Stefan Beller
> +extern enum protocol_version get_protocol_version_config(void); > +extern enum protocol_version determine_protocol_version_server(void); > +extern enum protocol_version determine_protocol_version_client(const char > *server_response); It would be cool to have some documentation here.

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > +`GIT_PROTOCOL`:: > + For internal use only. Used in handshaking the wire protocol. > + Contains a colon ':' separated list of keys with optional values > + 'key[=value]'. Presence of unknown keys must be tolerated. Is this meant to be

[PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-26 Thread Brandon Williams
Create protocol.{c,h} and provide functions which future servers and clients can use to determine which protocol to use or is being used. Also introduce the 'GIT_PROTOCOL' environment variable which will be used to communicate a colon separated list of keys with optional values to a server.