aboutsummaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2026-02-24 13:59:39 -0500
committerJunio C Hamano <gitster@pobox.com>2026-02-24 11:16:32 -0800
commitde811c26bb97ac324b60883ae4f4db84a83be2f1 (patch)
tree4961743a6fa3f05969e5ae43fd21699b6b138b87 /t/helper
parent00c0d84e6f0cdb91b0f261e12ed058ad3baa49bf (diff)
downloadgit-de811c26bb97ac324b60883ae4f4db84a83be2f1.tar.xz
midx: rename `get_midx_checksum()` to `midx_get_checksum_hash()`
Since 541204aabea (Documentation: document naming schema for structs and their functions, 2024-07-30), we have adopted a naming convention for functions that would prefer a name like, say, `midx_get_checksum()` over `get_midx_checksum()`. Adopt this convention throughout the midx.h API. Since this function returns a raw (that is, non-hex encoded) hash, let's suffix the function with "_hash()" to make this clear. As a side effect, this prepares us for the subsequent change which will introduce a "_hex()" variant that encodes the checksum itself. Suggested-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-read-midx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 6de5d1665a..b8fefb1a12 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -34,7 +34,7 @@ static int read_midx_file(const char *object_dir, const char *checksum,
return 1;
if (checksum) {
- while (m && strcmp(hash_to_hex(get_midx_checksum(m)), checksum))
+ while (m && strcmp(hash_to_hex(midx_get_checksum_hash(m)), checksum))
m = m->base_midx;
if (!m)
return 1;
@@ -94,7 +94,7 @@ static int read_midx_checksum(const char *object_dir)
m = setup_midx(object_dir);
if (!m)
return 1;
- printf("%s\n", hash_to_hex(get_midx_checksum(m)));
+ printf("%s\n", hash_to_hex(midx_get_checksum_hash(m)));
close_midx(m);
return 0;