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

Function add_one_ref

reachable.c:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86static int add_one_ref(const struct reference *ref, void *cb_data)
87{
88 struct rev_info *revs = (struct rev_info *)cb_data;
89 struct object *object;
90
91 if ((ref->flags & REF_ISSYMREF) && (ref->flags & REF_ISBROKEN)) {
92 warning("symbolic ref is dangling: %s", ref->name);
93 return 0;
94 }
95
96 object = parse_object_or_die(the_repository, ref->oid, ref->name);
97 add_pending_object(revs, object, "");
98
99 return 0;
100}
101
102/*
103 * The traversal will have already marked us as SEEN, so we

Callers

nothing calls this directly

Calls 3

warningFunction · 0.85
parse_object_or_dieFunction · 0.85
add_pending_objectFunction · 0.85

Tested by

no test coverage detected