| 269 | } |
| 270 | |
| 271 | static uint32_t store_cached_object_pos(struct bitmap_writer *writer, |
| 272 | const struct object_id *oid, |
| 273 | uint32_t pos) |
| 274 | { |
| 275 | size_t slot; |
| 276 | |
| 277 | if (pos & BITMAP_POS_CACHE_VALID) |
| 278 | return pos; /* too large to cache */ |
| 279 | |
| 280 | slot = bitmap_writer_pos_cache_slot(writer, oid); |
| 281 | |
| 282 | oidcpy(&writer->pos_cache[slot].oid, oid); |
| 283 | writer->pos_cache[slot].pos = pos | BITMAP_POS_CACHE_VALID; |
| 284 | |
| 285 | return pos; |
| 286 | } |
| 287 | |
| 288 | static uint32_t find_object_pos(struct bitmap_writer *writer, |
| 289 | const struct object_id *oid, int *found) |
no test coverage detected