Commit a5a8890
pack-revindex: prepare for incremental MIDX bitmaps
Prepare the reverse index machinery to handle object lookups in an
incremental MIDX bitmap. These changes are broken out across a few
functions:
- load_midx_revindex() learns to use the appropriate MIDX filename
depending on whether the given 'struct multi_pack_index *' is
incremental or not.
- pack_pos_to_midx() and midx_to_pack_pos() now both take in a global
object position in the MIDX pseudo-pack order, and finds the
earliest containing MIDX (similar to midx.c::midx_for_object().
- midx_pack_order_cmp() adjusts its call to pack_pos_to_midx() by the
number of objects in the base (since 'vb - midx->revindx_data' is
relative to the containing MIDX, and pack_pos_to_midx() expects a
global position).
Likewise, this function adjusts its output by adding
m->num_objects_in_base to return a global position out through the
`*pos` pointer.
Together, these changes are sufficient to use the multi-pack index's
reverse index format for incremental multi-pack reachability bitmaps.
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 3a31033 commit a5a8890
2 files changed
+43
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
173 | 182 | | |
174 | 183 | | |
175 | 184 | | |
| |||
925 | 934 | | |
926 | 935 | | |
927 | 936 | | |
928 | | - | |
| 937 | + | |
929 | 938 | | |
930 | 939 | | |
931 | 940 | | |
| |||
993 | 1002 | | |
994 | 1003 | | |
995 | 1004 | | |
996 | | - | |
| 1005 | + | |
997 | 1006 | | |
998 | 1007 | | |
999 | 1008 | | |
| |||
1498 | 1507 | | |
1499 | 1508 | | |
1500 | 1509 | | |
1501 | | - | |
| 1510 | + | |
| 1511 | + | |
1502 | 1512 | | |
1503 | 1513 | | |
1504 | 1514 | | |
| |||
1677 | 1687 | | |
1678 | 1688 | | |
1679 | 1689 | | |
1680 | | - | |
| 1690 | + | |
1681 | 1691 | | |
1682 | 1692 | | |
1683 | 1693 | | |
| |||
1703 | 1713 | | |
1704 | 1714 | | |
1705 | 1715 | | |
1706 | | - | |
| 1716 | + | |
1707 | 1717 | | |
1708 | 1718 | | |
1709 | 1719 | | |
| |||
1726 | 1736 | | |
1727 | 1737 | | |
1728 | 1738 | | |
1729 | | - | |
| 1739 | + | |
1730 | 1740 | | |
1731 | 1741 | | |
1732 | 1742 | | |
| |||
1878 | 1888 | | |
1879 | 1889 | | |
1880 | 1890 | | |
1881 | | - | |
| 1891 | + | |
1882 | 1892 | | |
1883 | 1893 | | |
1884 | 1894 | | |
| |||
2399 | 2409 | | |
2400 | 2410 | | |
2401 | 2411 | | |
2402 | | - | |
| 2412 | + | |
2403 | 2413 | | |
2404 | 2414 | | |
2405 | 2415 | | |
| |||
2798 | 2808 | | |
2799 | 2809 | | |
2800 | 2810 | | |
2801 | | - | |
| 2811 | + | |
2802 | 2812 | | |
2803 | 2813 | | |
2804 | 2814 | | |
| |||
2941 | 2951 | | |
2942 | 2952 | | |
2943 | 2953 | | |
2944 | | - | |
| 2954 | + | |
2945 | 2955 | | |
2946 | 2956 | | |
2947 | 2957 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
388 | 392 | | |
389 | 393 | | |
390 | 394 | | |
| |||
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
474 | 482 | | |
475 | 483 | | |
476 | | - | |
| 484 | + | |
477 | 485 | | |
478 | | - | |
| 486 | + | |
479 | 487 | | |
480 | 488 | | |
481 | 489 | | |
| |||
491 | 499 | | |
492 | 500 | | |
493 | 501 | | |
494 | | - | |
| 502 | + | |
| 503 | + | |
495 | 504 | | |
496 | 505 | | |
497 | 506 | | |
| |||
529 | 538 | | |
530 | 539 | | |
531 | 540 | | |
532 | | - | |
| 541 | + | |
533 | 542 | | |
534 | | - | |
| 543 | + | |
535 | 544 | | |
536 | 545 | | |
537 | 546 | | |
| |||
551 | 560 | | |
552 | 561 | | |
553 | 562 | | |
554 | | - | |
| 563 | + | |
| 564 | + | |
555 | 565 | | |
556 | 566 | | |
557 | 567 | | |
558 | 568 | | |
559 | 569 | | |
560 | 570 | | |
561 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
562 | 576 | | |
563 | 577 | | |
564 | | - | |
| 578 | + | |
565 | 579 | | |
566 | 580 | | |
567 | 581 | | |
| |||
0 commit comments