diff options
author | Taylor Blau <me@ttaylorr.com> | 2022-01-25 17:41:01 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-27 12:07:52 -0800 |
commit | 61fd31a17975ba27ef1d4a3f25bf55b92f5e7738 (patch) | |
tree | ddd941dcabdbd57f2fce3fe90fc2253f0fa4d3c3 /url.h | |
parent | The sixth batch (diff) | |
download | tgif-61fd31a17975ba27ef1d4a3f25bf55b92f5e7738.tar.xz |
t5326: demonstrate bitmap corruption after permutation
This patch demonstrates a cause of bitmap corruption that can occur when
the contents of the multi-pack index does not change, but the underlying
object order does.
In this example, we have a MIDX containing two packs, each with a
distinct set of objects (pack A corresponds to the tree, blob, and
commit from the first patch, and pack B corresponds to the second
patch).
First, a MIDX is written where the 'A' pack is preferred. As expected,
the bitmaps generated there are in-tact. But then, we generate an
identical MIDX with a different object order: this time preferring pack
'B'.
Due to a bug which will be explained and fixed in the following commit,
the MIDX is updated, but the .rev file is not, causing the .bitmap file
to be read incorrectly. Specifically, the .bitmap file will contain
correct data, but the auxiliary object order in the .rev file is stale,
causing readers to get confused by reading the new bitmaps using the old
object order.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'url.h')
0 files changed, 0 insertions, 0 deletions