| 345 | } |
| 346 | |
| 347 | static 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 | |
| 374 | void add_pending_oid(struct rev_info *revs, const char *name, |
| 375 | const struct object_id *oid, unsigned int flags) |
no test coverage detected