git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH v7 3/3] git-remote-ext

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 13, 2010, 23:32 UTC
Message-ID
<7v7hhlhdnt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1286901583-30088-4-git-send-email-ilari.liusvaara@elisanet.fi>
Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:
Show 14 quoted lines
> +'%G<repository>' (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 <repository>. Default is not to send
> +	such request.
> ++
> +This is useful if remote side is git:// server accessed over
> +some tunnel.
> +
> +'%V<host>' (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?

Show 22 quoted lines
> +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?
Previous: Ilari LiusvaaraNext: Jonathan Nieder
Message 6 of 7 in “git-remote-fd & git-remote-ext”
  1. 0/3 git-remote-fd & git-remote-extIlari Liusvaara, Oct 12, 2010
  2. 1/3 Add bidirectional_transfer_loop()Ilari Liusvaara, Oct 12, 2010
  3. 2/3 git-remote-fdIlari Liusvaara, Oct 12, 2010
  4. Junio C HamanoOct 13, 2010
  5. 3/3 git-remote-extIlari Liusvaara, Oct 12, 2010
  6. Junio C HamanoOct 13, 2010
  7. remote-ext: do not segfault for blank linesJonathan Nieder, Jan 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.