From fbabe855ad6f9a7b2a50a54d0d826d2e65538154 Mon Sep 17 00:00:00 2001 From: Isaac Kearse Date: Sun, 8 Sep 2013 14:11:08 +1200 Subject: [PATCH 1/2] Trim leading colon from ssh repository path --- src/transports/ssh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transports/ssh.c b/src/transports/ssh.c index e0126a8fb..47ea5ccf7 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -51,6 +51,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url) repo = strchr(url, '/'); } else { repo = strchr(url, ':'); + repo++; } if (!repo) { From b345026baaed21ffe8d325f784e597cf6bb779a6 Mon Sep 17 00:00:00 2001 From: Isaac Kearse Date: Tue, 10 Sep 2013 05:16:52 +1200 Subject: [PATCH 2/2] Test for repo before removing leading colon --- src/transports/ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transports/ssh.c b/src/transports/ssh.c index 47ea5ccf7..bf62bd185 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -51,7 +51,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url) repo = strchr(url, '/'); } else { repo = strchr(url, ':'); - repo++; + if (repo) repo++; } if (!repo) {