| 17 | "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin | --packfile=hash | commit-id] url"; |
| 18 | |
| 19 | static int fetch_using_walker(const char *raw_url, int get_verbosely, |
| 20 | int get_recover, int commits, char **commit_id, |
| 21 | const char **write_ref, int commits_on_stdin) |
| 22 | { |
| 23 | char *url = NULL; |
| 24 | struct walker *walker; |
| 25 | int rc; |
| 26 | |
| 27 | str_end_url_with_slash(raw_url, &url); |
| 28 | |
| 29 | http_init(NULL, url, 0); |
| 30 | |
| 31 | walker = get_http_walker(url); |
| 32 | walker->get_verbosely = get_verbosely; |
| 33 | walker->get_recover = get_recover; |
| 34 | walker->get_progress = 0; |
| 35 | |
| 36 | rc = walker_fetch(walker, commits, commit_id, write_ref, url); |
| 37 | |
| 38 | if (commits_on_stdin) |
| 39 | walker_targets_free(commits, commit_id, write_ref); |
| 40 | |
| 41 | if (walker->corrupt_object_found) { |
| 42 | fprintf(stderr, |
| 43 | "Some loose object were found to be corrupt, but they might be just\n" |
| 44 | "a false '404 Not Found' error message sent with incorrect HTTP\n" |
| 45 | "status code. Suggest running 'git fsck'.\n"); |
| 46 | } |
| 47 | |
| 48 | walker_free(walker); |
| 49 | http_cleanup(); |
| 50 | free(url); |
| 51 | |
| 52 | return rc; |
| 53 | } |
| 54 | |
| 55 | static void fetch_single_packfile(struct object_id *packfile_hash, |
| 56 | const char *url, |
no test coverage detected