MCPcopy Index your code
hub / github.com/git/git / parse_get

Function parse_get

remote-curl.c:1320–1341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1318}
1319
1320static void parse_get(const char *arg)
1321{
1322 struct strbuf url = STRBUF_INIT;
1323 struct strbuf path = STRBUF_INIT;
1324 const char *space;
1325
1326 space = strchr(arg, ' ');
1327
1328 if (!space)
1329 die(_("protocol error: expected '<url> <path>', missing space"));
1330
1331 strbuf_add(&url, arg, space - arg);
1332 strbuf_addstr(&path, space + 1);
1333
1334 if (http_get_file(url.buf, path.buf, NULL))
1335 die(_("failed to download file at URL '%s'"), url.buf);
1336
1337 strbuf_release(&url);
1338 strbuf_release(&path);
1339 printf("\n");
1340 fflush(stdout);
1341}
1342
1343static int push_dav(int nr_spec, const char **specs)
1344{

Callers 1

cmd_mainFunction · 0.85

Calls 5

strbuf_addFunction · 0.85
strbuf_addstrFunction · 0.85
http_get_fileFunction · 0.85
strbuf_releaseFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected