Commit 4a7df51
pack-bitmap.c: teach
The pack-bitmap machinery uses `bitmap_for_commit()` to locate the
EWAH-compressed bitmap corresponding to some given commit object.
Teach this function about incremental MIDX bitmaps by teaching it to
recur on earlier bitmap layers when it fails to find a given commit in
the current layer.
The changes to do so are as follows:
- Avoid initializing hash_pos at its declaration, since
bitmap_for_commit() is now a recursive function and may receive a
NULL bitmap_index pointer as its first argument.
- In cases where we would previously return NULL (to indicate that a
lookup failed and the given bitmap_index does not contain an entry
corresponding to the given commit), recursively call the function on
the previous bitmap layer.
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>bitmap_for_commit() about incremental MIDXs1 parent f34db3f commit 4a7df51
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
950 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
951 | 954 | | |
952 | 955 | | |
953 | 956 | | |
954 | | - | |
| 957 | + | |
955 | 958 | | |
956 | 959 | | |
957 | 960 | | |
958 | 961 | | |
959 | 962 | | |
960 | | - | |
| 963 | + | |
961 | 964 | | |
962 | 965 | | |
963 | 966 | | |
| |||
0 commit comments