diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-02-10 10:18:30 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-10 10:18:31 -0800 |
| commit | 246569bf83f2a586268d26559c7d6ea54c9316b6 (patch) | |
| tree | 29bdf8fd459a337adef85012b88d6ed71830a147 /t/unit-tests | |
| parent | 0ca6b46d7ca17988da3b7292097e5608be81abad (diff) | |
| parent | 0578f1e66aa381356bfe2f53decf3864d88d23d3 (diff) | |
| download | git-246569bf83f2a586268d26559c7d6ea54c9316b6.tar.gz | |
Merge branch 'ps/hash-cleanup'
Further code clean-up on the use of hash functions. Now the
context object knows what hash function it is working with.
* ps/hash-cleanup:
global: adapt callers to use generic hash context helpers
hash: provide generic wrappers to update hash contexts
hash: stop typedeffing the hash context
hash: convert hashing context to a structure
Diffstat (limited to 't/unit-tests')
| -rw-r--r-- | t/unit-tests/u-hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/unit-tests/u-hash.c b/t/unit-tests/u-hash.c index a0320efe4b..bd4ac6a6e1 100644 --- a/t/unit-tests/u-hash.c +++ b/t/unit-tests/u-hash.c @@ -8,13 +8,13 @@ static void check_hash_data(const void *data, size_t data_length, cl_assert(data != NULL); for (size_t i = 1; i < ARRAY_SIZE(hash_algos); i++) { - git_hash_ctx ctx; + struct git_hash_ctx ctx; unsigned char hash[GIT_MAX_HEXSZ]; const struct git_hash_algo *algop = &hash_algos[i]; algop->init_fn(&ctx); - algop->update_fn(&ctx, data, data_length); - algop->final_fn(hash, &ctx); + git_hash_update(&ctx, data, data_length); + git_hash_final(hash, &ctx); cl_assert_equal_s(hash_to_hex_algop(hash,algop), expected_hashes[i - 1]); } |
