Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-06 00:54:26 +0300
committerJunio C Hamano <gitster@pobox.com>2020-05-06 00:54:26 +0300
commitfd65fc3960a972ab2f03b94d08f0e421d9ee22bb (patch)
tree05661137277959a67079a9f8fd43bde7e83b92fa /strbuf.h
parentb34789c0b0d3b137f0bb516b417bd8d75e0cb306 (diff)
parentb44d0118ac5074215ece7ae2bb86ad0713f70674 (diff)
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 16f47202eb..7062eb6410 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,