]> git.ipfire.org Git - thirdparty/git.git/blobdiff - http.c
branch: don't mix --edit-description
[thirdparty/git.git] / http.c
diff --git a/http.c b/http.c
index 5f348169c3cdcafbfdc561a468996f7118ce3a56..5f712634825ee7a9a10c344f889ca262f94f6407 100644 (file)
--- a/http.c
+++ b/http.c
@@ -558,6 +558,7 @@ static int has_cert_password(void)
                return 0;
        if (!cert_auth.password) {
                cert_auth.protocol = xstrdup("cert");
+               cert_auth.host = xstrdup("");
                cert_auth.username = xstrdup("");
                cert_auth.path = xstrdup(ssl_cert);
                credential_fill(&cert_auth);
@@ -680,8 +681,8 @@ static void curl_dump_header(const char *text, unsigned char *ptr, size_t size,
        for (header = headers; *header; header++) {
                if (hide_sensitive_header)
                        redact_sensitive_header(*header);
-               strbuf_insert((*header), 0, text, strlen(text));
-               strbuf_insert((*header), strlen(text), ": ", 2);
+               strbuf_insertstr((*header), 0, text);
+               strbuf_insertstr((*header), strlen(text), ": ");
                strbuf_rtrim((*header));
                strbuf_addch((*header), '\n');
                trace_strbuf(&trace_curl, (*header));