]> git.99rst.org Git - git.git/commit
builtin/repack.c: avoid "the_hash_algo" when deleting packs
authorTaylor Blau <redacted>
Wed, 15 Oct 2025 22:27:33 +0000 (18:27 -0400)
committerJunio C Hamano <redacted>
Thu, 16 Oct 2025 17:08:53 +0000 (10:08 -0700)
commit3758052c0f43fd01d25fc7381c7939daba66c015
tree78d07f09d5bb03a47e66da3feb9144e5e6ed6900
parentcae9e2abbd8fb2fd483e101275cee15ef27d5953
builtin/repack.c: avoid "the_hash_algo" when deleting packs

The "mark_packs_for_deletion_1" function uses "the_hash_algo->hexsz" to
isolate a pack's checksum before deleting it to avoid deleting a newly
written pack having the same checksum (that is, some generated pack
wound up identical to an existing pack).

Avoid this by passing down a "struct git_hash_algo" pointer, and refer to
the hash algorithm through it instead.

Signed-off-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/repack.c
git clone https://git.99rst.org/PROJECT