git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Ballard <kevin@sb.org>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Kevin Ballard <kevin@sb.org>
Subject: [PATCH] Trim leading / off of paths in git-svn prop_walk
Date: Wed,  9 Jan 2008 01:37:20 -0500	[thread overview]
Message-ID: <1199860640-74118-1-git-send-email-kevin@sb.org> (raw)

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

             reply	other threads:[~2008-01-09  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  6:37 Kevin Ballard [this message]
2008-01-09 20:54 ` [PATCH] Trim leading / off of paths in git-svn prop_walk Junio C Hamano
2008-01-09 22:55   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1199860640-74118-1-git-send-email-kevin@sb.org \
    --to=kevin@sb.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).