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

Function get_refs_from_bundle

transport.c:151–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static struct ref *get_refs_from_bundle(struct transport *transport,
152 int for_push,
153 struct transport_ls_refs_options *transport_options UNUSED)
154{
155 struct bundle_transport_data *data = transport->data;
156 struct ref *result = NULL;
157
158 if (for_push)
159 return NULL;
160
161 get_refs_from_bundle_inner(transport);
162
163 for (size_t i = 0; i < data->header.references.nr; i++) {
164 struct string_list_item *e = data->header.references.items + i;
165 const char *name = e->string;
166 struct ref *ref = alloc_ref(name);
167 struct object_id *oid = e->util;
168 oidcpy(&ref->old_oid, oid);
169 ref->next = result;
170 result = ref;
171 }
172 return result;
173}
174
175static int fetch_fsck_config_cb(const char *var, const char *value,
176 const struct config_context *ctx UNUSED, void *cb)

Callers

nothing calls this directly

Calls 3

alloc_refFunction · 0.85
oidcpyFunction · 0.85

Tested by

no test coverage detected