[PATCH] Trim leading / off of paths in git-svn prop_walk

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: <gitster@...>, Kevin Ballard <kevin@...>
Date: Wednesday, January 9, 2008 - 2:37 am

prop_walk adds a leading / to all subdirectory paths. Unfortunately
this causes a problem when the remote repo lives in a subdirectory itself,
as the leading / causes subsequent PROPFIND calls to be executed on
the wrong path. Trimming the / before calling the PROPFIND fixes this problem.

Signed-off-by: Kevin Ballard <kevin@sb.org>
---
All tests passed after this change, but since it seems to only apply
to WebDAV SVN repos I saw no way to add a new test.
 git-svn.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 3308fe1..d5316eb 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1858,6 +1858,7 @@ sub rel_path {
 sub prop_walk {
 	my ($self, $path, $rev, $sub) = @_;
 
+	$path =~ s#^/##;
 	my ($dirent, undef, $props) = $self->ra->get_dir($path, $rev);
 	$path =~ s#^/*#/#g;
 	my $p = $path;
-- 
1.5.4.rc2.68.ge708a-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Trim leading / off of paths in git-svn prop_walk, Kevin Ballard, (Wed Jan 9, 2:37 am)