diff --git a/connect.c b/connect.c
index 3a125621465a68a267d08f74d842238a078c51b2..20054e4d0fd4cf94288593726be179d07d19271c 100644 (file)
--- a/connect.c
+++ b/connect.c
c = ':';
}
+ /*
+ * Don't do destructive transforms with git:// as that
+ * protocol code does '[]' dewrapping 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