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 /credential.c | |
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 'credential.c')
-rw-r--r-- | credential.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/credential.c b/credential.c index 064e25e5d5..d72e2ed0d8 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); } } |