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

Re: [PATCH] translate bad characters in refnames during git-svn fetch

From
JHJan Hudec <bulb@ucw.cz>
Date
Jul 16, 2007, 11:15 UTC
Message-ID
<20070716111509.GC18293@efreet.light.src>
In-Reply-To
<20070716033050.GA29521@muzzle>
On Sun, Jul 15, 2007 at 20:30:50 -0700, Eric Wong wrote:
Show 11 quoted lines
> The major issue with this is that it doesn't handle odd cases
> where a refname is sanitized into something
> (say "1234~2" sanitizes to "1234=2"), and then another branch
> is created named "1234=2".
> 
> git-svn should at least keep track of what it got sanitized to, to
> avoid clobbering branches.
> 
> I started working on this a while back but haven't gotten around
> to revisiting it:
> http://thread.gmane.org/gmane.comp.version-control.git/45651

I believe % is safe, right? So what if git-svn just url-escaped stuff in the branch name it does not like. Of course % would be included in the list of characters it does not like. Eg. 1234~2 would escape to 1234%7E2 and if the user ever head 1234%7E2 in svn, it would simply escape too, to 1234%257E2.

Space is rather common, but that's why there is the + rule in url-encoding -- "foo bar" escapes to "foo+bar" and "foo+bar" escapes to "foo%2Bbar". Or you could use something else to escape space. I can only think of "=", "_" is too common to have it escaped and anything else would conflict with either git or shell.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Eric WongNext: martin f krafft
Message 3 of 10 in “translate bad characters in refnames during git-svn fetch”
  1. translate bad characters in refnames during git-svn fetchmartin f krafft, Jul 15, 2007
  2. Eric WongJul 16, 2007
  3. Jan HudecJul 16, 2007
  4. martin f krafftJul 16, 2007
  5. Eric WongJul 17, 2007
  6. martin f krafftJul 17, 2007
  7. Robert EwaldJul 26, 2007
  8. Martin F KrafftJul 26, 2007
  9. Mike HommeyJul 28, 2007
  10. David KastrupJul 28, 2007

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.