{"thread":{"id":"28812","subject":"[PATCH] svn: Quote repository root in regex match","startedAt":"2011-10-31T22:37:12Z","lastAt":"2011-11-01T20:13:11Z","messageCount":2,"participants":["Ted Percival","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"178590","messageId":"1320100632-10058-1-git-send-email-ted.percival@quest.com","threadId":"28812","inReplyTo":null,"subject":"[PATCH] svn: Quote repository root in regex match","fromName":"Ted Percival","fromEmail":"ted.percival@quest.com","sentAt":"2011-10-31T22:37:12Z","receivedAt":"2011-10-31T22:37:12Z","isPatch":true,"sender":{"key":"ted@midg3t.net","avatar":"https://avatars.githubusercontent.com/u/253416?v=4"},"body":"Fixes a problem matching repository URLs, especially those with a '+' in\nthe URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as\nspecial characters by the regex matching.\n\nSigned-off-by: Ted Percival <ted.percival@quest.com>\n---\n git-svn.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 351e743..4e95450 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -629,7 +629,7 @@ sub populate_merge_info {\n \t\t\t\tfatal \"merge commit $d has ancestor $parent, but that change \"\n                      .\"does not have git-svn metadata!\";\n \t\t\t}\n-\t\t\tunless ($branchurl =~ /^$rooturl(.*)/) {\n+\t\t\tunless ($branchurl =~ /^\\Q$rooturl\\E(.*)/) {\n \t\t\t\tfatal \"commit $parent git-svn metadata changed mid-run!\";\n \t\t\t}\n \t\t\tmy $branchpath = $1;\n@@ -791,7 +791,7 @@ sub cmd_dcommit {\n \t\t\t\t\t\t\t .\"has uuid $uuid!\";\n \t\t\t\t\t}\n \n-\t\t\t\t\tunless ($branchurl =~ /^$rooturl(.*)/) {\n+\t\t\t\t\tunless ($branchurl =~ /^\\Q$rooturl\\E(.*)/) {\n \t\t\t\t\t\t# This branch is very strange indeed.\n \t\t\t\t\t\tfatal \"merge parent $parent for $d is on branch \"\n \t\t\t\t\t\t\t .\"$branchurl, which is not under the \"\n-- \n1.7.7\n"},{"id":"178639","messageId":"20111101201310.GA29769@dcvr.yhbt.net","threadId":"28812","inReplyTo":"1320100632-10058-1-git-send-email-ted.percival@quest.com","subject":"Re: [PATCH] svn: Quote repository root in regex match","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2011-11-01T20:13:11Z","receivedAt":"2011-11-01T20:13:11Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Ted Percival <ted.percival@quest.com> wrote:\n> Fixes a problem matching repository URLs, especially those with a '+' in\n> the URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as\n> special characters by the regex matching.\n> \n> Signed-off-by: Ted Percival <ted.percival@quest.com>\n\nLooks obviously correct to me, thanks\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\nAnd pushed to master of git://bogomips.org/git-svn.git\n(commit 0e7e30f5606b48a4c6d34bc99c6d680bb76d3fbc)\n"}]}