X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=credential.c;h=e54753c75d1c2abf7916f1aa7075d4ada3cfc61f;hb=29499c0b2741cc2ea13b78a342048bad928dfe2a;hp=62d1c56819e5351e5697dab7ff13d33ac806c398;hpb=0626fae6afc9c6976aead4237691fb3568dd5c68;p=~andy%2Fgit diff --git a/credential.c b/credential.c index 62d1c5681..e54753c75 100644 --- a/credential.c +++ b/credential.c @@ -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);