summaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-05-04 02:19:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-07 15:32:14 (GMT)
commit60003340cda05f5ecd79ee8522b21eda038b994b (patch)
tree6d072e229727d6a3a73ac36c7685a006be95a443 /t/t5601-clone.sh
parent239222f587ed06f96d90dd71c66d80a2b1e3dc9f (diff)
downloadgit-60003340cda05f5ecd79ee8522b21eda038b994b.zip
git-60003340cda05f5ecd79ee8522b21eda038b994b.tar.gz
git-60003340cda05f5ecd79ee8522b21eda038b994b.tar.bz2
clone: allow cloning local paths with colons in them
Usually "foo:bar" is interpreted as an ssh url. This patch allows to clone from such paths by putting at least one slash before the colon (i.e. /path/to/foo:bar or just ./foo:bar). file://foo:bar should also work, but local optimizations are off in that case, which may be unwanted. While at there, warn the users about --local being ignored in this case. Reported-by: William Giokas <1007380@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-xt/t5601-clone.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 67869b4..0629149 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -280,4 +280,9 @@ test_expect_success 'clone checking out a tag' '
test_cmp fetch.expected fetch.actual
'
+test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
+ cp -R src "foo:bar" &&
+ git clone "./foo:bar" foobar
+'
+
test_done