| 208 | } |
| 209 | |
| 210 | static void credential_describe(struct credential *c, struct strbuf *out) |
| 211 | { |
| 212 | if (!c->protocol) |
| 213 | return; |
| 214 | strbuf_addf(out, "%s://", c->protocol); |
| 215 | if (c->username && *c->username) |
| 216 | strbuf_addf(out, "%s@", c->username); |
| 217 | if (c->host) |
| 218 | strbuf_addstr(out, c->host); |
| 219 | if (c->path) |
| 220 | strbuf_addf(out, "/%s", c->path); |
| 221 | } |
| 222 | |
| 223 | static void credential_format(struct credential *c, struct strbuf *out) |
| 224 | { |
no test coverage detected