Merge branch 'da/difftool-mergetool-simplify-reporting-status'
[gitweb.git] / t / t5500-fetch-pack.sh
index 545dd7b8e1cdb4fa989846fba10a314154629a45..5b2b1c2c130387332778f6e49043b739dd2d7d21 100755 (executable)
@@ -561,20 +561,18 @@ do
                do
                        case "$p" in
                        *ssh*)
-                               hh=$(echo $h | tr -d "[]")
                                pp=ssh
                                ;;
                        *)
-                               hh=$h
                                pp=$p
                        ;;
                        esac
                        test_expect_success "fetch-pack --diag-url $p://$h/$r" '
-                               check_prot_host_path $p://$h/$r $pp "$hh" "/$r"
+                               check_prot_host_path $p://$h/$r $pp "$h" "/$r"
                        '
                        # "/~" -> "~" conversion
                        test_expect_success "fetch-pack --diag-url $p://$h/~$r" '
-                               check_prot_host_path $p://$h/~$r $pp "$hh" "~$r"
+                               check_prot_host_path $p://$h/~$r $pp "$h" "~$r"
                        '
                done
        done
@@ -589,6 +587,36 @@ do
                        check_prot_path $p://$h/~$r $p "/~$r"
                '
        done
+       # file without scheme
+       for h in nohost nohost:12 [::1] [::1]:23 [ [:aa
+       do
+               test_expect_success "fetch-pack --diag-url ./$h:$r" '
+                       check_prot_path ./$h:$r $p "./$h:$r"
+               '
+               # No "/~" -> "~" conversion for file
+               test_expect_success "fetch-pack --diag-url ./$p:$h/~$r" '
+               check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
+               '
+       done
+       #ssh without scheme
+       p=ssh
+       for h in host [::1]
+       do
+               test_expect_success "fetch-pack --diag-url $h:$r" '
+                       check_prot_path $h:$r $p "$r"
+               '
+               # Do "/~" -> "~" conversion
+               test_expect_success "fetch-pack --diag-url $h:/~$r" '
+                       check_prot_host_path $h:/~$r $p "$h" "~$r"
+               '
+       done
 done
 
+test_expect_success MINGW 'fetch-pack --diag-url file://c:/repo' '
+       check_prot_path file://c:/repo file c:/repo
+'
+test_expect_success MINGW 'fetch-pack --diag-url c:repo' '
+       check_prot_path c:repo file c:repo
+'
+
 test_done