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

Function deref_tag

tag.c:76–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76struct object *deref_tag(struct repository *r, struct object *o, const char *warn, int warnlen)
77{
78 struct object_id *last_oid = NULL;
79 while (o && o->type == OBJ_TAG)
80 if (((struct tag *)o)->tagged) {
81 last_oid = &((struct tag *)o)->tagged->oid;
82 o = parse_object(r, last_oid);
83 } else {
84 last_oid = NULL;
85 o = NULL;
86 }
87 if (!o && warn) {
88 if (last_oid && is_promisor_object(r, last_oid))
89 return NULL;
90 if (!warnlen)
91 warnlen = strlen(warn);
92 error("missing object referenced by '%.*s'", warnlen, warn);
93 }
94 return o;
95}
96
97struct tag *lookup_tag(struct repository *r, const struct object_id *oid)
98{

Callers 15

ref_newerFunction · 0.85
get_refFunction · 0.85
check_single_commitFunction · 0.85
shortlogFunction · 0.85
add_remote_info_refFunction · 0.85
find_single_finalFunction · 0.85
dwim_reverse_initialFunction · 0.85
find_single_initialFunction · 0.85
peel_onionFunction · 0.85

Calls 3

parse_objectFunction · 0.85
is_promisor_objectFunction · 0.85
errorFunction · 0.85

Tested by 1

cmd__reachFunction · 0.68