summaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorTorsten Bögershausen <tboegi@web.de>2013-11-28 20:49:38 +0100
committerJunio C Hamano <gitster@pobox.com>2013-12-09 14:54:47 -0800
commit6a59974869c0a6e9399101bc02223b4c00a8aff2 (patch)
tree8d3a9ce35fe91b08ff128079bf9fb92147c5d014 /t/t5601-clone.sh
parent854aeb7beb85a7a3f05fc11daea7c8d2fed3a22c (diff)
downloadgit-6a59974869c0a6e9399101bc02223b4c00a8aff2.tar.gz
git fetch: support host:/~repo
The documentation (in urls.txt) says that "ssh://host:/~repo", "host:/~repo" or "host:~repo" specify the repository "repo" in the home directory at "host". This has not been working for "host:/~repo". Before commit 356bec "Support [address] in URLs", the comparison "url != hostname" could be used to determine if the URL had a scheme or not: "ssh://host/host" != "host". However, after 356bec "[::1]" was converted into "::1", yielding url != hostname as well. To fix this regression, don't use "if (url != hostname)", but look at the separator instead. Rename the variable "c" into "separator" to make it easier to read. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-xt/t5601-clone.sh12
1 files changed, 2 insertions, 10 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index ba99972d88..4db0c0b01e 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -348,7 +348,7 @@ test_expect_success MINGW 'clone c:temp is dos drive' '
'
#ip v4
-for repo in rep rep/home/project /~proj 123
+for repo in rep rep/home/project 123
do
test_expect_success "clone host:$repo" '
test_clone_url host:$repo host $repo
@@ -356,14 +356,6 @@ do
done
#ipv6
-# failing
-for repo in /~proj
-do
- test_expect_failure "clone [::1]:$repo" '
- test_clone_url [::1]:$repo ::1 $repo
- '
-done
-
for repo in rep rep/home/project 123
do
test_expect_success "clone [::1]:$repo" '
@@ -373,7 +365,7 @@ done
# Corner cases
# failing
-for repo in [foo]bar/baz:qux [foo/bar]:baz
+for url in [foo]bar/baz:qux [foo/bar]:baz
do
test_expect_failure "clone $url is not ssh" '
test_clone_url $url none