git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] clone: local URLs are not for ssh
@ 2013-09-28 19:37 Torsten Bögershausen
  2013-09-29  0:33 ` Duy Nguyen
  0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bögershausen @ 2013-09-28 19:37 UTC (permalink / raw)
  To: git; +Cc: pclouds

"git clone /foo/bar:baz" or "git clone ../foo/bar:baz"
are meant to clone from the local file system, and not to clone
from a remote server over git-over-ssh.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 connect.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/connect.c b/connect.c
index a80ebd3..b382032 100644
--- a/connect.c
+++ b/connect.c
@@ -550,7 +550,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
 		end = host;
 
 	path = strchr(end, c);
-	if (path && !has_dos_drive_prefix(end)) {
+	if (path && !has_dos_drive_prefix(end) &&
+	    url[0] != '/' && url[0] != '.' ) {
 		if (c == ':') {
 			if (path < strchrnul(host, '/')) {
 				protocol = PROTO_SSH;
-- 
1.8.4.457.g424cb08

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-10-15  7:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-28 19:37 [PATCH] clone: local URLs are not for ssh Torsten Bögershausen
2013-09-29  0:33 ` Duy Nguyen
2013-10-02 18:40   ` Torsten Bögershausen
2013-10-03  1:01     ` Duy Nguyen
2013-10-03  1:31       ` Jeff King
2013-10-05 19:48         ` Torsten Bögershausen
2013-10-05 20:35           ` Matthieu Moy
2013-10-13 20:00           ` Torsten Bögershausen
2013-10-15  0:12             ` Jeff King
2013-10-15  7:22               ` Torsten Bögershausen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).