parse-options: report uncorrupted multi-byte options
[git.git] / credential.c
index 62d1c56819e5351e5697dab7ff13d33ac806c398..e54753c75d1c2abf7916f1aa7075d4ada3cfc61f 100644 (file)
@@ -172,6 +172,8 @@ int credential_read(struct credential *c, FILE *fp)
                } else if (!strcmp(key, "path")) {
                        free(c->path);
                        c->path = xstrdup(value);
+               } else if (!strcmp(key, "url")) {
+                       credential_from_url(c, value);
                }
                /*
                 * Ignore other lines; we don't know what they mean, but
@@ -191,7 +193,7 @@ static void credential_write_item(FILE *fp, const char *key, const char *value)
        fprintf(fp, "%s=%s\n", key, value);
 }
 
-static void credential_write(const struct credential *c, FILE *fp)
+void credential_write(const struct credential *c, FILE *fp)
 {
        credential_write_item(fp, "protocol", c->protocol);
        credential_write_item(fp, "host", c->host);