Re: [PATCH] remote-http: use argv-array

2013-07-09 Thread Jeff King
On Tue, Jul 09, 2013 at 10:27:29PM +, Matt Kraai wrote: > > Nice catch. We cannot use variadic macros, because we support pre-C99 > > compilers that do not have them. But the sentinel attribute is a good > > idea. Here's a patch. > > This attribute could also be used for > builtin/revert.c:ve

Re: [PATCH] remote-http: use argv-array

2013-07-09 Thread Matt Kraai
Jeff King writes: > On Tue, Jul 09, 2013 at 08:05:19AM +0200, Bert Wesarg wrote: > > > + argv_array_pushl(&args, "send-pack", "--stateless-rpc", "--helper-status"); > > > > missing NULL sentinel. GCC has the 'sentinel' [1] attribute to catch > > such errors. Or use macro magic: > > > > voi

Re: [PATCH] remote-http: use argv-array

2013-07-08 Thread Jeff King
On Tue, Jul 09, 2013 at 08:05:19AM +0200, Bert Wesarg wrote: > > + argv_array_pushl(&args, "send-pack", "--stateless-rpc", > > "--helper-status"); > > missing NULL sentinel. GCC has the 'sentinel' [1] attribute to catch > such errors. Or use macro magic: > > void argv_array_pushl_(struct

Re: [PATCH] remote-http: use argv-array

2013-07-08 Thread Bert Wesarg
On Tue, Jul 9, 2013 at 7:18 AM, Junio C Hamano wrote: > Instead of using a hand-managed argument array, use argv-array API > to manage dynamically formulated command line. > > Signed-off-by: Junio C Hamano > --- > remote-curl.c | 31 +++ > 1 file changed, 15 insertion

[PATCH] remote-http: use argv-array

2013-07-08 Thread Junio C Hamano
Instead of using a hand-managed argument array, use argv-array API to manage dynamically formulated command line. Signed-off-by: Junio C Hamano --- remote-curl.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/remote-curl.c b/remote-curl.c in