diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-05-04 09:19:33 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-07 08:32:14 -0700 |
commit | 60003340cda05f5ecd79ee8522b21eda038b994b (patch) | |
tree | 6d072e229727d6a3a73ac36c7685a006be95a443 /builtin | |
parent | Git 1.8.2 (diff) | |
download | tgif-60003340cda05f5ecd79ee8522b21eda038b994b.tar.xz |
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 'builtin')
-rw-r--r-- | builtin/clone.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index e0aaf13583..a4d444a94b 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -724,6 +724,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) is_local = option_local != 0 && path && !is_bundle; if (is_local && option_depth) warning(_("--depth is ignored in local clones; use file:// instead.")); + if (option_local > 0 && !is_local) + warning(_("--local is ignored")); if (argc == 2) dir = xstrdup(argv[1]); |