diff options
| author | Jeff King <peff@peff.net> | 2024-10-25 03:01:25 -0400 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2024-10-25 17:35:46 -0400 |
| commit | 4390fea963b284a3cc904ffc6c48d4ab02ea5e68 (patch) | |
| tree | 13ff2674faa7f107b3903c24631eef2a7edbf09c /packfile.c | |
| parent | c2dc4c9fbb1f119be6ab55ff8676bf18b4b9446a (diff) | |
| download | git-4390fea963b284a3cc904ffc6c48d4ab02ea5e68.tar.xz | |
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 'packfile.c')
| -rw-r--r-- | packfile.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/packfile.c b/packfile.c index 48d650161f..0d4fd2737a 100644 --- a/packfile.c +++ b/packfile.c @@ -35,12 +35,6 @@ char *odb_pack_name(struct strbuf *buf, return buf->buf; } -char *sha1_pack_index_name(const unsigned char *sha1) -{ - static struct strbuf buf = STRBUF_INIT; - return odb_pack_name(&buf, sha1, "idx"); -} - static unsigned int pack_used_ctr; static unsigned int pack_mmap_calls; static unsigned int peak_pack_open_windows; |
