6 #include "fetch-object.h"
8 void fetch_object(const char *remote_name, const unsigned char *sha1)
10 struct remote *remote;
11 struct transport *transport;
14 remote = remote_get(remote_name);
16 die(_("Remote with no URL"));
17 transport = transport_get(remote, remote->url[0]);
19 ref = alloc_ref(sha1_to_hex(sha1));
20 hashcpy(ref->old_oid.hash, sha1);
21 transport_set_option(transport, TRANS_OPT_FROM_PROMISOR, "1");
22 transport_set_option(transport, TRANS_OPT_NO_DEPENDENTS, "1");
23 transport_fetch_refs(transport, ref);