Thread (67 messages) flat view 67 messages, 6 authors, 2021-10-01

Re: [PATCH v2 3/8] midx: preliminary support for `--refs-snapshot`

From: Jonathan Tan <hidden>
Date: 2021-09-22 23:00:18

This approach will cause a problem when multi-pack bitmaps are able to
be generated from `git repack`, since the reference tips can change
during the repack. Even though we ignore commits that don't exist in
the MIDX (when doing a scan of the ref tips), it's possible that a
commit in the MIDX reaches something that isn't.

This can happen when a multi-pack index contains some pack which refers
to loose objects (which by definition aren't included in the multi-pack
index).

By taking a snapshot of the references before we start repacking, we can
close that race window.
I can understand why we want the refs to remain the same both for the
MIDX generation and the MIDX bitmap generation (one reason that comes to
mind is how we select the commits for which to generate bitmaps), but I
don't understand what referring to loose objects has to do with it. I
think that using the same set of refs for MIDX generation and bitmap
generation is a good enough reason to do this, and we don't need to
mention loose objects.

The patch itself looks good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help