| 752 | } |
| 753 | |
| 754 | static int add_ref_to_pending(const struct reference *ref, void *cb_data) |
| 755 | { |
| 756 | struct rev_info *revs = (struct rev_info*)cb_data; |
| 757 | const struct object_id *maybe_peeled = ref->oid; |
| 758 | struct object_id peeled; |
| 759 | struct object *object; |
| 760 | |
| 761 | if ((ref->flags & REF_ISSYMREF) && (ref->flags & REF_ISBROKEN)) { |
| 762 | warning("symbolic ref is dangling: %s", ref->name); |
| 763 | return 0; |
| 764 | } |
| 765 | |
| 766 | if (!reference_get_peeled_oid(revs->repo, ref, &peeled)) |
| 767 | maybe_peeled = &peeled; |
| 768 | |
| 769 | object = parse_object_or_die(revs->repo, maybe_peeled, ref->name); |
| 770 | if (object->type != OBJ_COMMIT) |
| 771 | return 0; |
| 772 | |
| 773 | add_pending_object(revs, object, ""); |
| 774 | if (bitmap_is_preferred_refname(revs->repo, ref->name)) |
| 775 | object->flags |= NEEDS_BITMAP; |
| 776 | return 0; |
| 777 | } |
| 778 | |
| 779 | struct bitmap_commit_cb { |
| 780 | struct commit_stack *commits; |
nothing calls this directly
no test coverage detected