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

Function register_ref_store_map

refs.c:2370–2379  ·  view source on GitHub ↗

* Associate a ref store with a name. It is a fatal error to call this * function twice for the same name. */

Source from the content-addressed store, hash-verified

2368 * function twice for the same name.
2369 */
2370static void register_ref_store_map(struct strmap *map,
2371 const char *type,
2372 struct ref_store *refs,
2373 const char *name)
2374{
2375 if (!map->map.tablesize)
2376 strmap_init(map);
2377 if (strmap_put(map, name, refs))
2378 BUG("%s ref_store '%s' initialized twice", type, name);
2379}
2380
2381struct ref_store *repo_get_submodule_ref_store(struct repository *repo,
2382 const char *submodule)

Callers 2

get_worktree_ref_storeFunction · 0.85

Calls 2

strmap_initFunction · 0.85
strmap_putFunction · 0.85

Tested by

no test coverage detected