| 1318 | } |
| 1319 | |
| 1320 | static 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 | |
| 1343 | static int push_dav(int nr_spec, const char **specs) |
| 1344 | { |
no test coverage detected