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

Function fetch_using_walker

http-fetch.c:19–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17"[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin | --packfile=hash | commit-id] url";
18
19static 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
55static void fetch_single_packfile(struct object_id *packfile_hash,
56 const char *url,

Callers 1

cmd_mainFunction · 0.85

Calls 7

str_end_url_with_slashFunction · 0.85
http_initFunction · 0.85
get_http_walkerFunction · 0.85
walker_fetchFunction · 0.85
walker_targets_freeFunction · 0.85
walker_freeFunction · 0.85
http_cleanupFunction · 0.85

Tested by

no test coverage detected