diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-05 23:54:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-05 23:54:26 +0200 |
commit | fd65fc3960a972ab2f03b94d08f0e421d9ee22bb (patch) | |
tree | 05661137277959a67079a9f8fd43bde7e83b92fa /strbuf.h | |
parent | The sixth batch (diff) | |
parent | credential: fix matching URLs with multiple levels in path (diff) | |
download | git-fd65fc3960a972ab2f03b94d08f0e421d9ee22bb.tar.xz git-fd65fc3960a972ab2f03b94d08f0e421d9ee22bb.zip |
Merge branch 'bc/wildcard-credential'
Update the parser used for credential.<URL>.<variable>
configuration, to handle <URL>s with '/' in them correctly.
* bc/wildcard-credential:
credential: fix matching URLs with multiple levels in path
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -378,11 +378,16 @@ size_t strbuf_expand_dict_cb(struct strbuf *sb, */ void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src); +#define STRBUF_ENCODE_SLASH 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_ENCODE_SLASH is set in flags, percent-encode slashes. Otherwise, + * slashes are not percent-encoded. */ -void strbuf_add_percentencode(struct strbuf *dst, const char *src); +void strbuf_add_percentencode(struct strbuf *dst, const char *src, int flags); /** * Append the given byte size as a human-readable string (i.e. 12.23 KiB, |