Re: [BUG] Colon in remote urls
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Dec 9, 2016, 21:32 UTC
- Message-ID
- <88bed7c9-4d5d-45d5-5d13-6a8ae834e602@kdbg.org>
- In-Reply-To
- <20161209152219.ehfk475vdg4levop@sigill.intra.peff.net>
Am 09.12.2016 um 16:22 schrieb Jeff King:
Show 15 quoted lines
> +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.
Show 8 quoted lines
> + else if (*p == sep) > + return p + 1; > + else > + strbuf_addch(out, *p); > + } > + } > + return p; > +}
-- Hannes