git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] svn: Quote repository root in regex match
@ 2011-10-31 22:37 Ted Percival
  2011-11-01 20:13 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Ted Percival @ 2011-10-31 22:37 UTC (permalink / raw
  To: git; +Cc: Eric Wong, Ted Percival

Fixes a problem matching repository URLs, especially those with a '+' in
the URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as
special characters by the regex matching.

Signed-off-by: Ted Percival <ted.percival@quest.com>
---
 git-svn.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 351e743..4e95450 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -629,7 +629,7 @@ sub populate_merge_info {
 				fatal "merge commit $d has ancestor $parent, but that change "
                      ."does not have git-svn metadata!";
 			}
-			unless ($branchurl =~ /^$rooturl(.*)/) {
+			unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
 				fatal "commit $parent git-svn metadata changed mid-run!";
 			}
 			my $branchpath = $1;
@@ -791,7 +791,7 @@ sub cmd_dcommit {
 							 ."has uuid $uuid!";
 					}
 
-					unless ($branchurl =~ /^$rooturl(.*)/) {
+					unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
 						# This branch is very strange indeed.
 						fatal "merge parent $parent for $d is on branch "
 							 ."$branchurl, which is not under the "
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] svn: Quote repository root in regex match
  2011-10-31 22:37 [PATCH] svn: Quote repository root in regex match Ted Percival
@ 2011-11-01 20:13 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2011-11-01 20:13 UTC (permalink / raw
  To: Ted Percival; +Cc: git

Ted Percival <ted.percival@quest.com> wrote:
> Fixes a problem matching repository URLs, especially those with a '+' in
> the URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as
> special characters by the regex matching.
> 
> Signed-off-by: Ted Percival <ted.percival@quest.com>

Looks obviously correct to me, thanks

Acked-by: Eric Wong <normalperson@yhbt.net>

And pushed to master of git://bogomips.org/git-svn.git
(commit 0e7e30f5606b48a4c6d34bc99c6d680bb76d3fbc)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-01 20:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31 22:37 [PATCH] svn: Quote repository root in regex match Ted Percival
2011-11-01 20:13 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).