From: Junio C Hamano Date: Wed, 13 Oct 2010 23:32:38 GMT Subject: Re: [RFC PATCH v7 3/3] git-remote-ext Message-ID: <7v7hhlhdnt.fsf@alter.siamese.dyndns.org> In-Reply-To: <1286901583-30088-4-git-send-email-ilari.liusvaara@elisanet.fi> Ilari Liusvaara writes: > +'%G' (as argument):: > + This argument will not be passed to 'program'. Instead, it > + will cause helper to start by sending git:// service request to > + remote side with service field set to approiate value and > + repository field set to . Default is not to send > + such request. > ++ > +This is useful if remote side is git:// server accessed over > +some tunnel. > + > +'%V' (as argument):: > + This argument will not be passed to 'program'. Instead it sets > + the vhost field in git:// service request. Default is not to > + send vhost in such request (if sent). The above does not say anything about being the first 'character' in an argument, like the in-code comment does. Is that intended? > +static const char **parse_argv(const char *arg, const char *service) > +{ > + int arguments = 0; > + int i; > + const char **ret; > + char *temparray[MAXARGUMENTS + 1]; > + > + while (*arg) { > + char *expanded; > + if (arguments == MAXARGUMENTS) > + die("remote-ext command has too many arguments"); > + expanded = strip_escapes(arg, service, &arg); > + if (expanded) > + temparray[arguments++] = expanded; > + } > + > + ret = xmalloc((arguments + 1) * sizeof(char *)); > + for (i = 0; i < arguments; i++) > + ret[i] = temparray[i]; > + ret[arguments] = NULL; > + return (const char **)ret; > +} Isn't "ret" declared to be of that type?