aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-01-31 13:55:29 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-31 10:06:10 -0800
commit7346e340f147131ca32089f61f7d0f502f80d19d (patch)
treec85e7270af3faa45fcc34afddac0e85a65731820 /t/helper
parent52eef501e17078b369da571d7e6b72c7494bb779 (diff)
downloadgit-7346e340f147131ca32089f61f7d0f502f80d19d.tar.gz
hash: stop typedeffing the hash context
We generally avoid using `typedef` in the Git codebase. One exception though is the `git_hash_ctx`, likely because it used to be a union rather than a struct until the preceding commit refactored it. But now that it is a normal `struct` there isn't really a need for a typedef anymore. Drop the typedef and adapt all callers accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-hash-speed.c4
-rw-r--r--t/helper/test-hash.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/t/helper/test-hash-speed.c b/t/helper/test-hash-speed.c
index 80df1aae66..803f41c89d 100644
--- a/t/helper/test-hash-speed.c
+++ b/t/helper/test-hash-speed.c
@@ -3,7 +3,7 @@
#define NUM_SECONDS 3
-static inline void compute_hash(const struct git_hash_algo *algo, git_hash_ctx *ctx, uint8_t *final, const void *p, size_t len)
+static inline void compute_hash(const struct git_hash_algo *algo, struct git_hash_ctx *ctx, uint8_t *final, const void *p, size_t len)
{
algo->init_fn(ctx);
algo->update_fn(ctx, p, len);
@@ -12,7 +12,7 @@ static inline void compute_hash(const struct git_hash_algo *algo, git_hash_ctx *
int cmd__hash_speed(int ac, const char **av)
{
- git_hash_ctx ctx;
+ struct git_hash_ctx ctx;
unsigned char hash[GIT_MAX_RAWSZ];
clock_t initial, start, end;
unsigned bufsizes[] = { 64, 256, 1024, 8192, 16384 };
diff --git a/t/helper/test-hash.c b/t/helper/test-hash.c
index aa82638c62..f9a3db487a 100644
--- a/t/helper/test-hash.c
+++ b/t/helper/test-hash.c
@@ -3,7 +3,7 @@
int cmd_hash_impl(int ac, const char **av, int algo, int unsafe)
{
- git_hash_ctx ctx;
+ struct git_hash_ctx ctx;
unsigned char hash[GIT_MAX_HEXSZ];
unsigned bufsz = 8192;
int binary = 0;