summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorTed Percival <ted.percival@quest.com>2011-10-31 16:37:12 -0600
committerEric Wong <normalperson@yhbt.net>2011-11-01 20:05:33 +0000
commit0e7e30f5606b48a4c6d34bc99c6d680bb76d3fbc (patch)
treeff493f4242703b3961d9e466b8071491e873130f /git-svn.perl
parentbe3fa9125e708348c7baf04ebe9507a72a9d1800 (diff)
downloadgit-0e7e30f5606b48a4c6d34bc99c6d680bb76d3fbc.tar.gz
svn: Quote repository root in regex match
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> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index b67fef0bf6..e30df22d89 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -684,7 +684,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;
@@ -867,7 +867,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 "