diff --git a/connect.c b/connect.c
index 3a125621465a68a267d08f74d842238a078c51b2..a37cf6af0428023d2d3ef01ab2e04fc462981af4 100644 (file)
--- a/connect.c
+++ b/connect.c
c = ':';
}
+ /*
+ * Don't do destructive transforms with git:// as that
+ * protocol code does '[]' unwrapping of its own.
+ */
if (host[0] == '[') {
end = strchr(host + 1, ']');
if (end) {
- *end = 0;
+ if (protocol != PROTO_GIT) {
+ *end = 0;
+ host++;
+ }
end++;
- host++;
} else
end = host;
} else