]> git.ipfire.org Git - thirdparty/git.git/commit
packfile: drop sha1_pack_index_name()
authorJeff King <peff@peff.net>
Fri, 25 Oct 2024 07:01:25 +0000 (03:01 -0400)
committerTaylor Blau <me@ttaylorr.com>
Fri, 25 Oct 2024 21:35:46 +0000 (17:35 -0400)
commit4390fea963b284a3cc904ffc6c48d4ab02ea5e68
tree13ff2674faa7f107b3903c24631eef2a7edbf09c
parentc2dc4c9fbb1f119be6ab55ff8676bf18b4b9446a
packfile: drop sha1_pack_index_name()

Like sha1_pack_name() that we dropped in the previous commit, this
function uses an error-prone static strbuf and the somewhat misleading
name "sha1".

The only caller left is in pack-redundant.c. While this command is
marked for potential removal in our BreakingChanges document, we still
have it for now. But it's simple enough to convert it to use its own
strbuf with the underlying odb_pack_name() function, letting us drop the
otherwise obsolete function.

Note that odb_pack_name() does its own strbuf_reset(), so it's safe to
use directly within a loop like this.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
builtin/pack-redundant.c
packfile.c
packfile.h