| 214 | } |
| 215 | |
| 216 | static uint32_t bitmap_name_hash(struct bitmap_index *index, uint32_t pos) |
| 217 | { |
| 218 | if (bitmap_is_midx(index)) { |
| 219 | while (index && pos < index->midx->num_objects_in_base) { |
| 220 | ASSERT(bitmap_is_midx(index)); |
| 221 | index = index->base; |
| 222 | } |
| 223 | |
| 224 | if (!index) |
| 225 | BUG("NULL base bitmap for object position: %"PRIu32, pos); |
| 226 | |
| 227 | pos -= index->midx->num_objects_in_base; |
| 228 | if (pos >= index->midx->num_objects) |
| 229 | BUG("out-of-bounds midx bitmap object at %"PRIu32, pos); |
| 230 | } |
| 231 | |
| 232 | if (!index->hashes) |
| 233 | return 0; |
| 234 | |
| 235 | return get_be32(index->hashes + pos); |
| 236 | } |
| 237 | |
| 238 | static struct repository *bitmap_repo(struct bitmap_index *bitmap_git) |
| 239 | { |
no test coverage detected