Skip to content

Commit

Permalink
git svn: branch/tag commands detect username in URLs
Browse files Browse the repository at this point in the history
svn+ssh:// repositories often have userinfo embedded in the URL
which were stripped out of the "git-svn-id:" trailers.  Since
the SVN::Client::copy function takes userinfo into account when
matching URLs for SVN repositories, we need to retrieve the full
URL with embedded userinfo in it to avoid mismatched URLs.

Tested-by: Florian Köberle <florian@fkoeberle.de>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Eric Wong committed Dec 23, 2009
1 parent 129a5a6 commit 150d38c
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 @@ -663,7 +663,8 @@ sub cmd_branch {
}
$head ||= 'HEAD';

my ($src, $rev, undef, $gs) = working_head_info($head);
my (undef, $rev, undef, $gs) = working_head_info($head);
my $src = $gs->full_url;

my $remote = Git::SVN::read_all_remotes()->{$gs->{repo_id}};
my $allglobs = $remote->{ $_tag ? 'tags' : 'branches' };
Expand Down

0 comments on commit 150d38c

Please sign in to comment.