summaryrefslogtreecommitdiff
path: root/credential.c
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 /credential.c
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 'credential.c')
-rw-r--r--credential.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/credential.c b/credential.c
index 064e25e..d72e2ed 100644
--- a/credential.c
+++ b/credential.c
@@ -136,14 +136,14 @@ static void credential_format(struct credential *c, struct strbuf *out)
return;
strbuf_addf(out, "%s://", c->protocol);
if (c->username && *c->username) {
- strbuf_add_percentencode(out, c->username);
+ strbuf_add_percentencode(out, c->username, STRBUF_ENCODE_SLASH);
strbuf_addch(out, '@');
}
if (c->host)
strbuf_addstr(out, c->host);
if (c->path) {
strbuf_addch(out, '/');
- strbuf_add_percentencode(out, c->path);
+ strbuf_add_percentencode(out, c->path, 0);
}
}