6 #include "fetch-object.h"
8 static void fetch_refs(const char *remote_name, struct ref *ref)
10 struct remote *remote;
11 struct transport *transport;
12 int original_fetch_if_missing = fetch_if_missing;
15 remote = remote_get(remote_name);
17 die(_("Remote with no URL"));
18 transport = transport_get(remote, remote->url[0]);
20 transport_set_option(transport, TRANS_OPT_FROM_PROMISOR, "1");
21 transport_set_option(transport, TRANS_OPT_NO_DEPENDENTS, "1");
22 transport_fetch_refs(transport, ref);
23 fetch_if_missing = original_fetch_if_missing;
26 void fetch_objects(const char *remote_name, const struct object_id *oids,
29 struct ref *ref = NULL;
32 for (i = 0; i < oid_nr; i++) {
33 struct ref *new_ref = alloc_ref(oid_to_hex(&oids[i]));
34 oidcpy(&new_ref->old_oid, &oids[i]);
38 fetch_refs(remote_name, ref);