aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorDeskin Miller <deskinm@umich.edu>2008-12-01 21:43:00 -0500
committerJunio C Hamano <gitster@pobox.com>2008-12-03 01:54:24 -0800
commita0fbc87cff6ae80c5b5be84201bc53252533b1fb (patch)
tree74a1a8ec7bdb55050e1b1e893b0e527aea89fba2 /git-svn.perl
parent757c7f60a78004fc3d0ea62f44320d54ef430c10 (diff)
downloadgit-a0fbc87cff6ae80c5b5be84201bc53252533b1fb.tar.gz
git-a0fbc87cff6ae80c5b5be84201bc53252533b1fb.tar.xz
git-svn: Make branch use correct svn-remote
The 'branch' subcommand incorrectly had the svn-remote to use hardcoded as 'svn', the default remote name. This meant that branches derived from other svn-remotes would try to use the branch and tag configuration for the 'svn' remote, potentially copying would-be branches to the wrong place in SVN, into the branch namespace for another project. Fix this by using the remote name extracted from the svn info for the specified git ref. Add a testcase for this behaviour. [jc: squashed in a fix to test from Michael J Gruber for older svn (1.4)] Signed-off-by: Deskin Miller <deskinm@umich.edu> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 914c707a9..e64e97b4d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -558,7 +558,7 @@ sub cmd_branch {
my ($src, $rev, undef, $gs) = working_head_info($head);
- my $remote = Git::SVN::read_all_remotes()->{svn};
+ my $remote = Git::SVN::read_all_remotes()->{$gs->{repo_id}};
my $glob = $remote->{ $_tag ? 'tags' : 'branches' };
my ($lft, $rgt) = @{ $glob->{path} }{qw/left right/};
my $dst = join '/', $remote->{url}, $lft, $branch_name, ($rgt || ());