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

Re: [PATCH 1/4] Client side of user-relative paths, take two.

From
Andreas Ericsson <ae@op5.se>
Date
Nov 2, 2005, 08:19 UTC
Message-ID
<43687699.8060609@op5.se>
In-Reply-To
<7vpspj6h3n.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 26 quoted lines
> Andreas Ericsson <ae@op5.se> writes:
> 
> 
>>+	if (protocol == PROTO_SSH && colon && (!path || colon < path)) {
>>+		*colon = 0;
>>+		path = colon + 1;
>>+	}
> 
> 
> I think "colon < path" is to cover "git://host.xz/foo/bar:baz"
> case (i.e. funny directory name with an embedded colon); I think
> you should reset colon to NULL if you do things differently
> later depending on colon is set or not, like this part:
> 
> 
>>+	/* null-terminate host part and point path to ~ for URL's like this:
>>+	 *    ssh://host.xz/~user/repo
>>+	 */
>>+	if(!colon && *(path + 1) == '~')
>>+		*path++ = '\0';
>>+	else {
>>+		colon = path;
>>+		path = strdup(path);
>>+		*colon = '\0';
> 
> 

True. Should I update this patch or submit a new one fixing only this specific issue?

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C Hamano
Message 3 of 3 in “Client side of user-relative paths, take two.”
  1. 1/4 Client side of user-relative paths, take two.Andreas Ericsson, Nov 1, 2005
  2. Junio C HamanoNov 2, 2005
  3. Andreas EricssonNov 2, 2005

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.