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

Function insert_oid_pair

loose.c:31–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static int insert_oid_pair(kh_oid_map_t *map, const struct object_id *key, const struct object_id *value)
32{
33 khiter_t pos;
34 int ret;
35 struct object_id *stored;
36
37 pos = kh_put_oid_map(map, *key, &ret);
38
39 /* This item already exists in the map. */
40 if (ret == 0)
41 return 0;
42
43 stored = xmalloc(sizeof(*stored));
44 oidcpy(stored, value);
45 kh_value(map, pos) = stored;
46 return 1;
47}
48
49static int insert_loose_map(struct odb_source_loose *loose,
50 const struct object_id *oid,

Callers 1

insert_loose_mapFunction · 0.85

Calls 2

oidcpyFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected