]> git.ipfire.org Git - thirdparty/git.git/commit
t/helper: add 'test-tool bitmap write' subcommand
authorTaylor Blau <me@ttaylorr.com>
Tue, 12 May 2026 00:46:48 +0000 (20:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 May 2026 01:36:17 +0000 (10:36 +0900)
commitbc2f6115693874b2e8feed80ff5539743d257920
tree1e4cb8e745ba1ace7f488eb6ff0ce5a9eace880e
parent8c9303b1ffae5b745d1b0a1f98330cf7944d8db0
t/helper: add 'test-tool bitmap write' subcommand

In f16eb1c091 (pseudo-merge: fix disk reads from find_pseudo_merge(),
2026-03-31), we noted that `apply_pseudo_merges_for_commit()` is never
triggered by the existing test suite, and that this bears further
investigation.

This patch is the first one to begin that investigation. The following
patches will expose and fix a variety of bugs in the implementation of
pseudo-merge bitmaps.

In order to do so, however, many of these tests require very precise
selection of which commits receive bitmaps and which do not. To date,
there isn't a standard approach to easily facilitate this. Address this
by introducing a `test-tool bitmap write` subcommand that writes a
bitmap for a given packfile, reading the set of commits which should
receive individual bitmaps from stdin like so:

    test-tool bitmap write <pack-basename> </path/to/commits.list

, where "<pack-basename>" is the filename for a specific packfile (e.g.,
"pack-abc123.pack"), and "/path/to/commits.list" is a list of commit
OIDs which will receive bitmaps.

The helper respects `bitmapPseudoMerge.*` configuration for creating
pseudo-merge bitmaps alongside the regular commit bitmaps.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-bitmap.c
t/t5310-pack-bitmaps.sh