@matheusbsbs / matheus-bagliano / commits / 63de84ad60
Fork 0

svn: Honor --prefix option in init without --stdlayout

Most users who type git svn init file:///tmp/repo --prefix=my-svn/ would expect the root of the svn repository to be tracked by refs/remotes/my-svn/git-svn. Acked-by: Eric Wong <normalperson@yhbt.net>

Adam Brewster committed Aug 3, 2009 at 21:40 UTC 63de84ad60984105b1cd60fb888968b352539313
1 file changed +2 -1
git-svn.perl
+2 -1
@@ -3317,7 +3317,8 @@ sub _new {
3317 $repo_id = $Git::SVN::default_repo_id;
3318 }
3319 unless (defined $ref_id && length $ref_id) {
3320 - $_[2] = $ref_id = $Git::SVN::default_ref_id;
3320 + $_prefix = '' unless defined($_prefix);
3321 + $_[2] = $ref_id = $_prefix . $Git::SVN::default_ref_id;
3322 }
3323 $_[1] = $repo_id;
3324 my $dir = "$ENV{GIT_DIR}/svn/$ref_id";