Re: [BUG] Colon in remote urls
From: Johannes Sixt <hidden>
Date: 2016-12-09 21:32:56
From: Johannes Sixt <hidden>
Date: 2016-12-09 21:32:56
Am 09.12.2016 um 16:22 schrieb Jeff King:
+const char *parse_alt_odb_entry(const char *string, int sep,
+ struct strbuf *out)
+{
+ const char *p;
+ int literal = 0;
+
+ strbuf_reset(out);
+
+ for (p = string; *p; p++) {
+ if (literal) {
+ strbuf_addch(out, *p);
+ literal = 0;
+ } else {
+ if (*p == '\\')
+ literal = 1;There are too many systems out there that use a backslash in path names. I don't think it is wise to use it also as the quoting character.
+ else if (*p == sep) + return p + 1; + else + strbuf_addch(out, *p); + } + } + return p; +}
-- Hannes