git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] midx: prevent writing a bitmap with zero objects
@ 2022-02-09 19:26 Taylor Blau
  2022-02-09 19:26 ` [PATCH 1/1] midx: prevent writing a .bitmap without any objects Taylor Blau
  0 siblings, 1 reply; 3+ messages in thread
From: Taylor Blau @ 2022-02-09 19:26 UTC (permalink / raw)
  To: git; +Cc: gitster, stolee

Here is a small patch I wrote after getting an alert that we tried to call
pack_pos_to_midx(..., 0) on a MIDX that contained zero objects.

The patch causes us to no longer write a bitmap for such a MIDX. More detailed
notes are within, and this is based on tb/midx-bitmap-corruption-fix. (The only
reason is that both this topic and that one add a new test to t5326, so merging
this one after that avoids a textual conflict).

Thanks in advance for your review.

Taylor Blau (1):
  midx: prevent writing a .bitmap without any objects

 midx.c                        |  9 +++++++++
 t/t5326-multi-pack-bitmaps.sh | 22 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

-- 
2.35.1.73.gccc5557600

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-10 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 19:26 [PATCH 0/1] midx: prevent writing a bitmap with zero objects Taylor Blau
2022-02-09 19:26 ` [PATCH 1/1] midx: prevent writing a .bitmap without any objects Taylor Blau
2022-02-10 14:41   ` Derrick Stolee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).