File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1745,11 +1745,12 @@ sub post_fetch_checkout {
1745
1745
1746
1746
sub complete_svn_url {
1747
1747
my ($url , $path ) = @_ ;
1748
- $path = canonicalize_path($path );
1749
1748
1750
- # If the path is not a URL...
1751
- if ($path !~ m # ^[a-z\+ ] +://# ) {
1752
- if (!defined $url || $url !~ m # ^[a-z\+ ] +://# ) {
1749
+ if ($path =~ m # ^[a-z\+ ] +://# i ) { # path is a URL
1750
+ $path = canonicalize_url($path );
1751
+ } else {
1752
+ $path = canonicalize_path($path );
1753
+ if (!defined $url || $url !~ m # ^[a-z\+ ] +://# i ) {
1753
1754
fatal(" E: '$path ' is not a complete URL " ,
1754
1755
" and a separate URL is not specified" );
1755
1756
}
@@ -1764,11 +1765,12 @@ sub complete_url_ls_init {
1764
1765
print STDERR " W: $switch not specified\n " ;
1765
1766
return ;
1766
1767
}
1767
- $repo_path = canonicalize_path( $repo_path );
1768
- if ( $repo_path =~ m # ^ [a-z \+ ] +:// # ) {
1768
+ if ( $repo_path =~ m # ^ [a-z \+ ] +:// # i ) {
1769
+ $repo_path = canonicalize_url( $repo_path );
1769
1770
$ra = Git::SVN::Ra-> new($repo_path );
1770
1771
$repo_path = ' ' ;
1771
1772
} else {
1773
+ $repo_path = canonicalize_path($repo_path );
1772
1774
$repo_path =~ s # ^/+## ;
1773
1775
unless ($ra ) {
1774
1776
fatal(" E: '$repo_path ' is not a complete URL " ,
Original file line number Diff line number Diff line change @@ -119,4 +119,10 @@ test_expect_success 'clone with -s/-T/-b/-t and --prefix "" still works' '
119
119
rm -f warning
120
120
'
121
121
122
+ test_expect_success ' init with -T as a full url works' '
123
+ test ! -d project &&
124
+ git svn init -T "$svnrepo"/project/trunk project &&
125
+ rm -rf project
126
+ '
127
+
122
128
test_done
You can’t perform that action at this time.
0 commit comments