diff options
author | Jeff King <peff@peff.net> | 2024-10-25 09:01:25 +0200 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2024-10-25 23:35:46 +0200 |
commit | 4390fea963b284a3cc904ffc6c48d4ab02ea5e68 (patch) | |
tree | 13ff2674faa7f107b3903c24631eef2a7edbf09c /packfile.h | |
parent | packfile: drop sha1_pack_name() (diff) | |
download | git-4390fea963b284a3cc904ffc6c48d4ab02ea5e68.tar.xz git-4390fea963b284a3cc904ffc6c48d4ab02ea5e68.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | packfile.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/packfile.h b/packfile.h index 2bbcc58571..6812abaae0 100644 --- a/packfile.h +++ b/packfile.h @@ -32,13 +32,6 @@ struct pack_entry { char *odb_pack_name(struct strbuf *buf, const unsigned char *sha1, const char *ext); /* - * Return the name of the (local) pack index file with the specified - * sha1 in its name. The return value is a pointer to memory that is - * overwritten each time this function is called. - */ -char *sha1_pack_index_name(const unsigned char *sha1); - -/* * Return the basename of the packfile, omitting any containing directory * (e.g., "pack-1234abcd[...].pack"). */ |