]> git.ipfire.org Git - thirdparty/git.git/commit
test-tool synthesize: add precomputed SHA-256 pack for 4 GiB + 1
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 8 May 2026 08:16:47 +0000 (08:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 9 May 2026 02:25:32 +0000 (11:25 +0900)
commitf549253b0b76f4f4a31ef8d5e98da72389f48189
tree647fd15f66f8a9318dce4a0d466c1be32b9d0167
parentad6ae3648ac24833f1bb2675091340f59a4c4f4a
test-tool synthesize: add precomputed SHA-256 pack for 4 GiB + 1

Add a SHA-256 entry to the fast_packs[] table. The pack prefix and
deflate block structure are identical to SHA-1 (the pack format does
not encode the hash algorithm in its header). Only the suffix differs:
SHA-256 OIDs are 32 bytes instead of 20, giving a 609-byte suffix
compared to 513 for SHA-1, and a different pack checksum.

The constants were generated by running the generic path inside a
repository initialized with --object-format=sha256.

Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-synthesize.c