From: Gerrit Pape Date: Tue, 26 Jan 2010 14:47:16 +0000 (+0000) Subject: git-cvsserver: allow regex metacharacters in CVSROOT X-Git-Tag: v1.7.0-rc1~20^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f9acaeae880feb87ae52e719aab930bf1f3e8413;p=git.git git-cvsserver: allow regex metacharacters in CVSROOT When run in a repository with a path name containing regex metacharacters (e.g. +), git-cvsserver failed to split the client request into CVSROOT and module. Now metacharacters are disabled for the value of CVSROOT in the perl regex so that directory names containing metacharacters are handled properly. Signed-off-by: Gerrit Pape Signed-off-by: Junio C Hamano --- diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 6dc45f5d4..046f5578a 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -388,7 +388,7 @@ sub req_Directory $state->{localdir} = $data; $state->{repository} = $repository; $state->{path} = $repository; - $state->{path} =~ s/^$state->{CVSROOT}\///; + $state->{path} =~ s/^\Q$state->{CVSROOT}\E\///; $state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//); $state->{path} .= "/" if ( $state->{path} =~ /\S/ );