| 385 | } |
| 386 | |
| 387 | static int copy_uri_to_file(const char *filename, const char *uri) |
| 388 | { |
| 389 | const char *out; |
| 390 | |
| 391 | if (starts_with(uri, "https:") || |
| 392 | starts_with(uri, "http:")) |
| 393 | return download_https_uri_to_file(filename, uri); |
| 394 | |
| 395 | if (skip_prefix(uri, "file://", &out)) |
| 396 | uri = out; |
| 397 | |
| 398 | /* Copy as a file */ |
| 399 | return copy_file(filename, uri, 0); |
| 400 | } |
| 401 | |
| 402 | static int unbundle_from_file(struct repository *r, const char *file) |
| 403 | { |
no test coverage detected