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

Re: [PATCH v2] Documentation/remote-helpers: Add invocation section

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Mar 30, 2010, 20:10 UTC
Message-ID
<20100330201007.GA26121@LK-Perkele-V2.elisa-laajakaista.fi>
In-Reply-To
<f3271551003301217h44c99d5bye4a614840661b05c@mail.gmail.com>
On Wed, Mar 31, 2010 at 12:47:09AM +0530, Ramkumar Ramachandra wrote:
Show 14 quoted lines
> 
> >  The URL in the second argument can be an arbitrary string.  It is up
> >  to the remote helper to assign meaning to it.
> 
> I'm not sure this is correct. Here's an excerpt from remote.c
> 	if (argc > 2) {
> 		url = argv[2];
> 	} else {
> 		url = remote->url[0];
> 	}
> Notice how url is set to remote->url[0], in the `else` branch, where
> the remote is an "ordinary remote" built by remote_get(). Even though
> url may be any arbitrary string in the `if` branch, there'll be
> problems when the program gets into the `else` branch transparently.

Note that remote may have no URLs. Or the passed url may be like (pathological example):

'tls://srp-Ilari@[1067a6e3af81b5ea76d615280eee2bc3dd2e8079@tcp/ipv6~fe80::20e:a6ff:fe6f:2288%2]:7684/gitolite-admin'

Or it may be something even more exotic with absolutely no recognizable URL-like structure, say hypothetical git-remote-fd, which would have passed syntax like:

"3,4"
Which doesn't even resemble an URL.
-Ilari
Previous: Jonathan NiederNext: Ramkumar Ramachandra
Message 5 of 8 in “Documentation/remote-helpers: Add invocation section”
  1. Documentation/remote-helpers: Add invocation sectionRamkumar Ramachandra, Mar 30, 2010
  2. Jonathan NiederMar 30, 2010
  3. Ramkumar RamachandraMar 30, 2010
  4. Jonathan NiederMar 30, 2010
  5. Ilari LiusvaaraMar 30, 2010
  6. Ramkumar RamachandraMar 30, 2010
  7. Jonathan NiederMar 30, 2010
  8. Ramkumar RamachandraMar 30, 2010

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.