| 393 | } |
| 394 | |
| 395 | static int parseopt_dump(const struct option *o, const char *arg, int unset) |
| 396 | { |
| 397 | struct strbuf *parsed = o->value; |
| 398 | if (unset) |
| 399 | strbuf_addf(parsed, " --no-%s", o->long_name); |
| 400 | else if (o->short_name && (o->long_name == NULL || !stuck_long)) |
| 401 | strbuf_addf(parsed, " -%c", o->short_name); |
| 402 | else |
| 403 | strbuf_addf(parsed, " --%s", o->long_name); |
| 404 | if (arg) { |
| 405 | if (!stuck_long) |
| 406 | strbuf_addch(parsed, ' '); |
| 407 | else if (o->long_name) |
| 408 | strbuf_addch(parsed, '='); |
| 409 | sq_quote_buf(parsed, arg); |
| 410 | } |
| 411 | return 0; |
| 412 | } |
| 413 | |
| 414 | static const char *skipspaces(const char *s) |
| 415 | { |
nothing calls this directly
no test coverage detected