Re: [PATCH] implemented strbuf_write_or_die()

2014-03-04 Thread Michael Haggerty
On 03/03/2014 07:31 PM, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: diff --git a/remote-curl.c b/remote-curl.c index 10cb011..dee8716

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-04 Thread Faiz Kothari
I'm the guilty one. I like the change (obviously, since I suggested it). Writing strbufs comes up frequently and will hopefully increase in usage and I think it is a positive thing to encourage the use of strbufs by making them increasingly first-class citizens. But I can see your points

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-04 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 03/03/2014 07:31 PM, Junio C Hamano wrote: That is a very good sign why this change is merely a code-churn and not an improvement, isn't it? We know (and any strbuf user should know) that -buf and -len are the ways to learn the pointer and the

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread Junio C Hamano
Faiz Kothari faiz.of...@gmail.com writes: Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of buf[MAX_PATH] but that would

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: diff --git a/remote-curl.c b/remote-curl.c index 10cb011..dee8716 100644 --- a/remote-curl.c +++ b/remote-curl.c @@

Fwd: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread Faiz Kothari
On Tue, Mar 4, 2014 at 12:01 AM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: diff --git a/remote-curl.c b/remote-curl.c

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread Eric Sunshine
On Mon, Mar 3, 2014 at 1:31 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: diff --git a/remote-curl.c b/remote-curl.c

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread David Kastrup
Eric Sunshine sunsh...@sunshineco.com writes: As a potential GSoC student and newcomer to the project, Faiz would not have known that this would be considered unwanted churn when he chose the task from the GSoC microproject page [1]. Perhaps it would be a good idea to retire this item from

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Mon, Mar 3, 2014 at 1:31 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com:

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-03 Thread Eric Sunshine
On Mon, Mar 3, 2014 at 3:35 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Mon, Mar 3, 2014 at 1:31 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: It's not obvious from the patch fragment, but 'heads' is

[PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of buf[MAX_PATH] but that would require a change in prototype of a lot of

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread He Sun
2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of

[PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- - write_or_die(1, rpc.result.buf, rpc.result.len); + strbuf_write_or_die(1, (rpc.result.buf)); May be this should be strbuf_write_or_die(1, (rpc.result)); Yes, I changed that :-) Thanks again. Maybe we just

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Johannes Sixt
Am 01.03.2014 12:21, schrieb Faiz Kothari: Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of buf[MAX_PATH] but that would

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Michael Haggerty
Please leave a little more time for people to give feedback between versions of a patch series (unless the first version was so broken that it would be pointless for any other reviewer to waste time on it. And please label the versions of a single patch series [PATCH] then [PATCH v2], [PATCH v3],

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: diff --git a/remote-curl.c b/remote-curl.c index 10cb011..dee8716 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -634,7 +634,7 @@ static int rpc_service(struct