MCPcopy Create free account
hub / github.com/git/git / parse_push

Function parse_push

remote-curl.c:1432–1460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430}
1431
1432static 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
1458free_specs:
1459 strvec_clear(&specs);
1460}
1461
1462static int stateless_connect(const char *service_name)
1463{

Callers 1

cmd_mainFunction · 0.85

Calls 5

strvec_pushFunction · 0.85
strbuf_getline_lfFunction · 0.85
pushFunction · 0.85
strvec_clearFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected