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

Function lookup_replace_object

replace-object.h:45–53  ·  view source on GitHub ↗

* If object sha1 should be replaced, return the replacement object's * name (replaced recursively, if necessary). The return value is * either sha1 or a pointer to a permanently-allocated value. When * object replacement is suppressed, always return sha1. * * Note: some thread debuggers might point a data race on the * replace_map_initialized reading in this function. However, we know ther

Source from the content-addressed store, hash-verified

43 * it here (and it should be written to only once, anyway).
44 */
45static inline const struct object_id *lookup_replace_object(struct repository *r,
46 const struct object_id *oid)
47{
48 if (!replace_refs_enabled(r) ||
49 (r->objects->replace_map_initialized &&
50 oidmap_get_size(&r->objects->replace_map) == 0))
51 return oid;
52 return do_lookup_replace_object(r, oid);
53}
54
55/*
56 * Some commands override config and environment settings for using

Callers 5

verify_oneFunction · 0.85
parse_object_with_flagsFunction · 0.85
verify_object_in_tagFunction · 0.85
odb_read_stream_openFunction · 0.85

Calls 3

replace_refs_enabledFunction · 0.85
oidmap_get_sizeFunction · 0.85
do_lookup_replace_objectFunction · 0.85

Tested by

no test coverage detected