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

Function add_path_to_list

path-walk.c:114–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114static void add_path_to_list(struct path_walk_context *ctx,
115 const char *path,
116 enum object_type type,
117 struct object_id *oid,
118 int interesting)
119{
120 struct type_and_oid_list *list = strmap_get(&ctx->paths_to_lists, path);
121
122 if (!list) {
123 CALLOC_ARRAY(list, 1);
124 list->type = type;
125 strmap_put(&ctx->paths_to_lists, path, list);
126 }
127
128 list->maybe_interesting |= interesting;
129 oid_array_append(&list->oids, oid);
130}
131
132static int add_tree_entries(struct path_walk_context *ctx,
133 const char *base_path,

Callers 2

add_tree_entriesFunction · 0.85
setup_pending_objectsFunction · 0.85

Calls 3

strmap_getFunction · 0.85
strmap_putFunction · 0.85
oid_array_appendFunction · 0.85

Tested by

no test coverage detected