MCPcopy Index your code
hub / github.com/git/git / show_object

Function show_object

builtin/pack-objects.c:4402–4422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4400}
4401
4402static void show_object(struct object *obj, const char *name,
4403 void *data UNUSED)
4404{
4405 add_preferred_base_object(name);
4406 add_object_entry(&obj->oid, obj->type, name, 0);
4407
4408 if (use_delta_islands) {
4409 const char *p;
4410 unsigned depth;
4411 struct object_entry *ent;
4412
4413 /* the empty string is a root tree, which is depth 0 */
4414 depth = *name ? 1 : 0;
4415 for (p = strchr(name, '/'); p; p = strchr(p + 1, '/'))
4416 depth++;
4417
4418 ent = packlist_find(&to_pack, &obj->oid);
4419 if (ent && depth > oe_tree_depth(&to_pack, ent))
4420 oe_set_tree_depth(&to_pack, ent, depth);
4421 }
4422}
4423
4424static void show_object__ma_allow_any(struct object *obj, const char *name, void *data)
4425{

Callers 2

Calls 5

add_object_entryFunction · 0.85
packlist_findFunction · 0.85
oe_tree_depthFunction · 0.85
oe_set_tree_depthFunction · 0.85

Tested by

no test coverage detected