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/helper/test-hash.c | |
| parent | Merge branch 'jt/gitlab-ci-base-fix' (diff) | |
| parent | global: adapt callers to use generic hash context helpers (diff) | |
| download | git-246569bf83f2a586268d26559c7d6ea54c9316b6.tar.gz git-246569bf83f2a586268d26559c7d6ea54c9316b6.zip | |
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/helper/test-hash.c')
| -rw-r--r-- | t/helper/test-hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/helper/test-hash.c b/t/helper/test-hash.c index aa82638c62..f0ee61c8b4 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; @@ -48,9 +48,9 @@ int cmd_hash_impl(int ac, const char **av, int algo, int unsafe) } if (this_sz == 0) break; - algop->update_fn(&ctx, buffer, this_sz); + git_hash_update(&ctx, buffer, this_sz); } - algop->final_fn(hash, &ctx); + git_hash_final(hash, &ctx); if (binary) fwrite(hash, 1, algop->rawsz, stdout); |
