summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-05 21:54:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-05 21:54:26 (GMT)
commitfd65fc3960a972ab2f03b94d08f0e421d9ee22bb (patch)
tree05661137277959a67079a9f8fd43bde7e83b92fa /strbuf.h
parentb34789c0b0d3b137f0bb516b417bd8d75e0cb306 (diff)
parentb44d0118ac5074215ece7ae2bb86ad0713f70674 (diff)
downloadgit-fd65fc3960a972ab2f03b94d08f0e421d9ee22bb.zip
git-fd65fc3960a972ab2f03b94d08f0e421d9ee22bb.tar.gz
git-fd65fc3960a972ab2f03b94d08f0e421d9ee22bb.tar.bz2
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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/strbuf.h b/strbuf.h
index 16f4720..7062eb6 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -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,