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

Function cache_one_alternate

fetch-pack.c:97–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95};
96
97static void cache_one_alternate(const struct object_id *oid,
98 void *vcache)
99{
100 struct alternate_object_cache *cache = vcache;
101 struct object *obj = parse_object(the_repository, oid);
102
103 if (!obj || (obj->flags & ALTERNATE))
104 return;
105
106 obj->flags |= ALTERNATE;
107 ALLOC_GROW(cache->items, cache->nr + 1, cache->alloc);
108 cache->items[cache->nr++] = obj;
109}
110
111static void for_each_cached_alternate(struct fetch_negotiator *negotiator,
112 void (*cb)(struct fetch_negotiator *,

Callers

nothing calls this directly

Calls 1

parse_objectFunction · 0.85

Tested by

no test coverage detected