From: Jonathan Nieder Date: Tue, 30 Mar 2010 19:59:10 GMT Subject: Re: [PATCH v2] Documentation/remote-helpers: Add invocation section Message-ID: <20100330195910.GB10977@progeny.tock> In-Reply-To: Ramkumar Ramachandra wrote: > On Wed, Mar 31, 2010 at 12:07 AM, Jonathan Nieder wrote: >>  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. Not sure I understand. Are there restrictions on the content of remote->url[0]? What I meant by "arbitrary string" is that it doesn’t have to have the form schema://path, it’s not restricted to a particular character set, it doesn’t have to avoid conflicting with meaningful URLs defined by other helpers, and so on. So it’s a resource locator but not very uniform. This is probably not very relevant to the user, but it should be relevant to the remote helper writer, I think. Jonathan