Commit 6dc5ef7
pack-bitmap-write: fill bitmap with commit history
The current implementation of bitmap_writer_build() creates a
reachability bitmap for every walked commit. After computing a bitmap
for a commit, those bits are pushed to an in-progress bitmap for its
children.
fill_bitmap_commit() assumes the bits corresponding to objects
reachable from the parents of a commit are already set. This means that
when visiting a new commit, we only have to walk the objects reachable
between it and any of its parents.
A future change to bitmap_writer_build() will relax this condition so
not all parents have their bits set. Prepare for that by having
'fill_bitmap_commit()' walk parents until reaching commits whose bits
are already set. Then, walk the trees for these commits as well.
This has no functional change with the current implementation of
bitmap_writer_build().
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 010e5ea commit 6dc5ef7
1 file changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | | - | |
| 283 | + | |
| 284 | + | |
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 289 | | |
292 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
293 | 307 | | |
294 | 308 | | |
295 | 309 | | |
| |||
319 | 333 | | |
320 | 334 | | |
321 | 335 | | |
| 336 | + | |
322 | 337 | | |
323 | 338 | | |
324 | 339 | | |
| |||
335 | 350 | | |
336 | 351 | | |
337 | 352 | | |
338 | | - | |
| 353 | + | |
339 | 354 | | |
340 | 355 | | |
341 | 356 | | |
| |||
360 | 375 | | |
361 | 376 | | |
362 | 377 | | |
| 378 | + | |
363 | 379 | | |
364 | 380 | | |
365 | 381 | | |
| |||
0 commit comments