Skip to content

Commit

Permalink
svn: Honor --prefix option in init without --stdlayout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Brewster authored and Eric Wong committed Aug 10, 2009
1 parent 4ebe6e9 commit 63de84a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -3317,7 +3317,8 @@ sub _new {
$repo_id = $Git::SVN::default_repo_id;
}
unless (defined $ref_id && length $ref_id) {
$_[2] = $ref_id = $Git::SVN::default_ref_id;
$_prefix = '' unless defined($_prefix);
$_[2] = $ref_id = $_prefix . $Git::SVN::default_ref_id;
}
$_[1] = $repo_id;
my $dir = "$ENV{GIT_DIR}/svn/$ref_id";
Expand Down

0 comments on commit 63de84a

Please sign in to comment.