git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Kevin Ballard <kevin@sb.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Don't try and percent-escape existing percent escapes in git-svn URIs
Date: Sun, 9 Mar 2008 18:15:23 -0700	[thread overview]
Message-ID: <20080310011523.GB17484@mayonaise> (raw)
In-Reply-To: <0FE6BDE6-961E-4671-B9EC-EFA25389DF54@sb.org>

Kevin Ballard <kevin@sb.org> wrote:
> On Mar 9, 2008, at 5:12 AM, Eric Wong wrote:
> 
> >Kevin Ballard <kevin@sb.org> wrote:
> >>git-svn: project names are percent-escaped ever since f5530b.
> >>Unfortunately this breaks the scenario where the user hands git-svn
> >>an already-escaped URI. Fix the regexp to skip over what looks like
> >>existing percent escapes, and test this scenario.
> >
> >What happens when something that _looks_ like a percent escape is
> >actually a part of the URL and not really an escape?
> 
> Have you ever seen a URL like that? I haven't. However, what is fairly  
> common is for URLs to contain spaces, and such URLs are always stored  
> already-escaped.

No, but I wouldn't be surprised if they existed (as people are already
crazy enough to put spaces in URLs).

> The standard situation that triggers this issue is pulling a URL from  
> `svn info`. Such a URL is already escaped, which means you can't feed  
> it into `git svn clone` directly, you have to de-escape it first. This  
> is a problem. Here's an example:
> 
> http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20on%20Rails.tmbundle
> 
> I tried cloning that and it failed, because it turned that into
> 
> http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%2520on%2520Rails.tmbundle
> 
> However, my friend who was still on v1.5.3.7 cloned that no problem,  
> since that was before the escaping code.

OK, I'll accept this.  If they really want to represent '%', they should
use "%25".  But this should only be done for http/https URLs as
svn(+ssh):// and file:// repositories aren't subject to the same rules
http/https are.

-- 
Eric Wong

      reply	other threads:[~2008-03-10  1:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08 23:20 [PATCH] Don't try and percent-escape existing percent escapes in git-svn URIs Kevin Ballard
2008-03-09  9:12 ` Eric Wong
2008-03-09 12:29   ` Kevin Ballard
2008-03-10  1:15     ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080310011523.GB17484@mayonaise \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=kevin@sb.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).