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

Re: [PATCH] git-svn: don't escape tilde ('~') for http(s) URLs

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 22, 2008, 18:53 UTC
Message-ID
<7viqrkv4vd.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081022081653.GC14966@untitled>
Eric Wong <normalperson@yhbt.net> writes:
Show 5 quoted lines
> Junio C Hamano <gitster@pobox.com> wrote:
>
> Help with looking at what SVN does and writing testcases would
> definitely be appreciated on this matter.  Or perhaps this can be done
> at GitTogether :)

I'm not sure it would be a good use of time at GitTogether to do something whose spec is pretty much self-evident (essentially for this one it boils down to "define what are the 'funny' bytes, and list the protocols supported by svn, and come up with paths with funny bytes in it and see what libsvn-perl gives to the underlying svn library, and what the svn library does over the wire"). Ongoiong "fix start-up sequence around worktree area" might be a better fit; I dunno.

Show 16 quoted lines
>> The patch may make a path with '~' work, but it (neither in the patch text
>> nor in the commit log message) does not have much to give readers enough
>> confidence that the code after the patch is the _final_ one, as opposed to
>> being just a band-aid for a single symptom that happened to have been
>> discovered this time.
>
> This is definitely a band-aid fix until I or somebody else takes the
> time to figure out:
>
>  1. exactly which characters need to be escaped
>  2. for which protocols those characters need to be escaped
>  3. which part(s) of the URI they need to be escaped for
>     (repository root vs SVN path)
>  4. which versions of SVN needs more (or less) escaping rules
>
> (I vote for somebody else, especially for #4 :)
Item 3. above disturbs me.  Do you mean that in:
    https://sucs.org/~welshbyte/svn/backuptool/trunk/foo~bar.txt
the two tildes might have to be sent to libsvn-perl differently?

Even if that is the case, I am inclined suggest taking the patch in the meantime as an interim workaround, with the understanding that we know the patch improves the situation for the tilde before welshbyte and even though we do not know if the patch regresses for the latter one between foo and bar, it would be much rarer to have tilde in such places.

Care to come up with an updated log message?
Previous: Eric WongNext: Eric Wong
Message 8 of 9 in “git-svn url-encodes ~ when it should not”
  1. Björn SteinbrinkOct 18, 2008
  2. Björn SteinbrinkOct 18, 2008
  3. git-svn: don't escape tilde ('~') for http(s) URLsEric Wong, Oct 21, 2008
  4. Junio C HamanoOct 21, 2008
  5. Mike HommeyOct 22, 2008
  6. Junio C HamanoOct 22, 2008
  7. Eric WongOct 22, 2008
  8. Junio C HamanoOct 22, 2008
  9. Eric WongOct 24, 2008

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.