From 4bbf599f7bb6bd6debb3624b27815f366b7b34a1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jul 2006 05:14:00 -0700 Subject: [PATCH] git-svn: avoid fetching files outside of the URL we're tracking Thanks to Santi for the bug report and explanation: > /path/to/repository/project/file > /path/to/repository/project-2/file <...> > you end up with a project with the following files: > > file > -2/file Signed-off-by: Eric Wong --- contrib/git-svn/git-svn.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl index 1e19aa19b2..8bc4188e03 100755 --- a/contrib/git-svn/git-svn.perl +++ b/contrib/git-svn/git-svn.perl @@ -2617,7 +2617,7 @@ sub libsvn_connect { sub libsvn_get_file { my ($gui, $f, $rev) = @_; my $p = $f; - return unless ($p =~ s#^\Q$SVN_PATH\E/?##); + return unless ($p =~ s#^\Q$SVN_PATH\E/##); my ($hash, $pid, $in, $out); my $pool = SVN::Pool->new; -- 2.11.4.GIT