MCPcopy Create free account
hub / github.com/git/git / fetch_dumb

Function fetch_dumb

remote-curl.c:1168–1192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1166}
1167
1168static int fetch_dumb(int nr_heads, struct ref **to_fetch)
1169{
1170 struct walker *walker;
1171 char **targets;
1172 int ret, i;
1173
1174 ALLOC_ARRAY(targets, nr_heads);
1175 if (options.depth || options.deepen_since)
1176 die(_("dumb http transport does not support shallow capabilities"));
1177 for (i = 0; i < nr_heads; i++)
1178 targets[i] = xstrdup(oid_to_hex(&to_fetch[i]->old_oid));
1179
1180 walker = get_http_walker(url.buf);
1181 walker->get_verbosely = options.verbosity >= 3;
1182 walker->get_progress = options.progress;
1183 walker->get_recover = 0;
1184 ret = walker_fetch(walker, nr_heads, targets, NULL, NULL);
1185 walker_free(walker);
1186
1187 for (i = 0; i < nr_heads; i++)
1188 free(targets[i]);
1189 free(targets);
1190
1191 return ret ? error(_("fetch failed.")) : 0;
1192}
1193
1194static int fetch_git(struct discovery *heads,
1195 int nr_heads, struct ref **to_fetch)

Callers 1

fetchFunction · 0.85

Calls 7

xstrdupFunction · 0.85
oid_to_hexFunction · 0.85
get_http_walkerFunction · 0.85
walker_fetchFunction · 0.85
walker_freeFunction · 0.85
errorFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected