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

Function get_reference

revision.c:347–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347static struct object *get_reference(struct rev_info *revs, const char *name,
348 const struct object_id *oid,
349 unsigned int flags)
350{
351 struct object *object;
352
353 object = parse_object_with_flags(revs->repo, oid,
354 revs->verify_objects ? 0 :
355 PARSE_OBJECT_SKIP_HASH_CHECK |
356 PARSE_OBJECT_DISCARD_TREE);
357
358 if (!object) {
359 if (revs->ignore_missing)
360 return NULL;
361 if (revs->exclude_promisor_objects &&
362 is_promisor_object(revs->repo, oid))
363 return NULL;
364 if (revs->do_not_die_on_missing_objects) {
365 oidset_insert(&revs->missing_commits, oid);
366 return NULL;
367 }
368 die("bad object %s", name);
369 }
370 object->flags |= flags;
371 return object;
372}
373
374void add_pending_oid(struct rev_info *revs, const char *name,
375 const struct object_id *oid, unsigned int flags)

Callers 7

add_pending_oidFunction · 0.85
handle_one_refFunction · 0.85
add_one_alternate_refFunction · 0.85
add_parents_onlyFunction · 0.85
handle_revision_arg_1Function · 0.85
handle_revision_optFunction · 0.85
setup_revisionsFunction · 0.85

Calls 4

parse_object_with_flagsFunction · 0.85
is_promisor_objectFunction · 0.85
oidset_insertFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected