Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Junio C Hamano
Jeff King writes: > + if ((agent_feature = server_feature_value("agent", &agent_len))) { > agent_supported = 1; > + if (args.verbose && agent_len) { > + fprintf(stderr, "Server version is %.*s\n", > + agent_len, agent_f

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Jeff King
On Mon, Aug 13, 2012 at 09:59:27PM -0400, Jeff King wrote: > So if we want to avoid the allocation, then this is how I would do it: > by returning the feature's _value_ and not the whole key. Since we know > that the beginning part must obviously match what we fed it anyway, it > is not that inter

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Jeff King
On Mon, Aug 13, 2012 at 05:11:10PM -0400, Jeff King wrote: > On Mon, Aug 13, 2012 at 02:09:32PM -0700, Junio C Hamano wrote: > > > >> +if ((agent_feature = server_feature("agent", &agent_len)) != > > >> NULL && > > >> +5 < agent_len && agent_feature[5] == '=') { > > >>

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Jeff King
On Mon, Aug 13, 2012 at 02:09:32PM -0700, Junio C Hamano wrote: > >> + if ((agent_feature = server_feature("agent", &agent_len)) != NULL && > >> + 5 < agent_len && agent_feature[5] == '=') { > >>agent_supported = 1; > >> + if (args.verbose) { > >> + fpri

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Junio C Hamano
Jeff King writes: > On Mon, Aug 13, 2012 at 12:07:35PM -0700, Junio C Hamano wrote: > >> * And this is your 4 adjusted for the previous one, releaving the >>caller from having to figure out where the capability string >>ends. >> [...] >> @@ -829,8 +831,15 @@ static struct ref *do_fetch_p

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Jeff King
On Mon, Aug 13, 2012 at 02:07:22PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Of course, a server can also say "agent=git/none-of-your-business"; this > > is just a syntactic question. > > You do not even have to advertise it in the first place, no? If you want the client to respon

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Junio C Hamano
Jeff King writes: > Of course, a server can also say "agent=git/none-of-your-business"; this > is just a syntactic question. You do not even have to advertise it in the first place, no? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.k

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Jeff King
On Mon, Aug 13, 2012 at 12:07:35PM -0700, Junio C Hamano wrote: > * And this is your 4 adjusted for the previous one, releaving the >caller from having to figure out where the capability string >ends. > [...] > @@ -829,8 +831,15 @@ static struct ref *do_fetch_pack(int fd[2], >

Re: [PATCH 4/4] fetch-pack: mention server version with verbose output

2012-08-13 Thread Junio C Hamano
Junio C Hamano writes: > Fetch-pack's verbose mode is more of a debugging mode (and in fact > takes two "-v" arguments to trigger via the porcelain layer). Let's > mention the server version as another possible item of interest. > > Signed-off-by: Jeff King > Signed-off-by: Junio C Hamano > ---