From: Junio C Hamano Date: Fri, 24 Apr 2020 20:20:37 GMT Subject: Re: [PATCH v2] credential: fix matching URLs with multiple levels in path Message-ID: In-Reply-To: <20200424045030.GA44448@Carlos-MBP> Carlo Marcelo Arenas Belón writes: > On Wed, Apr 22, 2020 at 07:51:09PM +0000, brian m. carlson wrote: >> --- a/strbuf.h >> +++ b/strbuf.h >> @@ -378,11 +378,15 @@ size_t strbuf_expand_dict_cb(struct strbuf *sb, >> */ >> void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src); >> >> +#define STRBUF_PERCENTENCODE_PATH 1 >> + >> /** >> * Append the contents of a string to a strbuf, percent-encoding any characters >> * that are needed to be encoded for a URL. >> + * >> + * If STRBUF_PERCENTENCODE_PATH is set in flags, don't percent-encode slashes. >> */ > > wouldn't it be better to call this STRBUF_PERCENTENCODE_SLASH instead?, since > it is actually not applied to path? I was about to say the same thing. Can we phrase it a bit shorter than PERCENTENCODE, by the way?