diff options
author | Kevin Ballard <kevin@sb.org> | 2008-03-20 16:08:49 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-20 23:59:12 -0700 |
commit | 8114da161611d6eb7cc6163aee2f5ba51ccad9f3 (patch) | |
tree | 24b54a9dc2d151a6e4215e7d9eaa8248d1e026fb /git-svn.perl | |
parent | 740fdd27f0888d5c80ef6a550734bdc53febd2df (diff) | |
download | git-8114da161611d6eb7cc6163aee2f5ba51ccad9f3.tar.gz |
Don't try and percent-escape existing percent escapes in git-svn URIs
git-svn project names are percent-escaped ever since f5530b8
(git-svn: support for funky branch and project names over HTTP(S),
2007-11-11).
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.
Signed-off-by: Kevin Ballard <kevin@sb.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl index bba22c1321..0c2b791eab 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3665,7 +3665,7 @@ sub escape_uri_only { my ($uri) = @_; my @tmp; foreach (split m{/}, $uri) { - s/([^\w.-])/sprintf("%%%02X",ord($1))/eg; + s/([^\w.%-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg; push @tmp, $_; } join('/', @tmp); |