Skip to content

Commit

Permalink
Merge git://git.bogomips.org/git-svn
Browse files Browse the repository at this point in the history
* git://git.bogomips.org/git-svn:
  git svn: avoid unnecessary '/' in paths for SVN
  git-svn: strip off leading slashes on --trunk argument
  • Loading branch information
Junio C Hamano committed Jun 14, 2010
2 parents 6339f67 + b1a954a commit 0925c02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ sub cmd_multi_init {
}
do_git_init_db();
if (defined $_trunk) {
$_trunk =~ s#^/+##;
my $trunk_ref = 'refs/remotes/' . $_prefix . 'trunk';
# try both old-style and new-style lookups:
my $gs_trunk = eval { Git::SVN->new($trunk_ref) };
Expand Down Expand Up @@ -2054,6 +2055,9 @@ sub new {
"\":$ref_id\$\" in config\n";
($self->{path}, undef) = split(/\s*:\s*/, $fetch);
}
$self->{path} =~ s{/+}{/}g;
$self->{path} =~ s{\A/}{};
$self->{path} =~ s{/\z}{};
$self->{url} = command_oneline('config', '--get',
"svn-remote.$repo_id.url") or
die "Failed to read \"svn-remote.$repo_id.url\" in config\n";
Expand Down

0 comments on commit 0925c02

Please sign in to comment.