| 1430 | } |
| 1431 | |
| 1432 | static void parse_push(struct strbuf *buf) |
| 1433 | { |
| 1434 | struct strvec specs = STRVEC_INIT; |
| 1435 | int ret; |
| 1436 | |
| 1437 | do { |
| 1438 | const char *arg; |
| 1439 | if (skip_prefix(buf->buf, "push ", &arg)) |
| 1440 | strvec_push(&specs, arg); |
| 1441 | else |
| 1442 | die(_("http transport does not support %s"), buf->buf); |
| 1443 | |
| 1444 | strbuf_reset(buf); |
| 1445 | if (strbuf_getline_lf(buf, stdin) == EOF) |
| 1446 | goto free_specs; |
| 1447 | if (!*buf->buf) |
| 1448 | break; |
| 1449 | } while (1); |
| 1450 | |
| 1451 | ret = push(specs.nr, specs.v); |
| 1452 | printf("\n"); |
| 1453 | fflush(stdout); |
| 1454 | |
| 1455 | if (ret) |
| 1456 | exit(128); /* error already reported */ |
| 1457 | |
| 1458 | free_specs: |
| 1459 | strvec_clear(&specs); |
| 1460 | } |
| 1461 | |
| 1462 | static int stateless_connect(const char *service_name) |
| 1463 | { |
no test coverage detected