| 1093 | } |
| 1094 | |
| 1095 | static int bitmap_position(struct bitmap_index *bitmap_git, |
| 1096 | const struct object_id *oid) |
| 1097 | { |
| 1098 | int pos; |
| 1099 | if (bitmap_is_midx(bitmap_git)) |
| 1100 | pos = bitmap_position_midx(bitmap_git, oid); |
| 1101 | else |
| 1102 | pos = bitmap_position_packfile(bitmap_git, oid); |
| 1103 | return (pos >= 0) ? pos : bitmap_position_extended(bitmap_git, oid); |
| 1104 | } |
| 1105 | |
| 1106 | static int ext_index_add_object(struct bitmap_index *bitmap_git, |
| 1107 | struct object *object, const char *name) |