diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-11-19 12:24:33 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-19 12:24:33 +0900 |
| commit | b8558e6abd8715cc9557abf10e8768e475fdeb5e (patch) | |
| tree | 7855252e56792e6acce38a79e4897eb6deee925e /t/unit-tests/lib-reftable.c | |
| parent | The seventh batch (diff) | |
| parent | reftable/system: provide thin wrapper for lockfile subsystem (diff) | |
| download | git-b8558e6abd8715cc9557abf10e8768e475fdeb5e.tar.gz git-b8558e6abd8715cc9557abf10e8768e475fdeb5e.zip | |
Merge branch 'ps/reftable-detach' into ps/reftable-iterator-reuse
* ps/reftable-detach:
reftable/system: provide thin wrapper for lockfile subsystem
reftable/stack: drop only use of `get_locked_file_path()`
reftable/system: provide thin wrapper for tempfile subsystem
reftable/stack: stop using `fsync_component()` directly
reftable/system: stop depending on "hash.h"
reftable: explicitly handle hash format IDs
reftable/system: move "dir.h" to its only user
Diffstat (limited to 't/unit-tests/lib-reftable.c')
| -rw-r--r-- | t/unit-tests/lib-reftable.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/unit-tests/lib-reftable.c b/t/unit-tests/lib-reftable.c index 2ddf480588..d795dfb7c9 100644 --- a/t/unit-tests/lib-reftable.c +++ b/t/unit-tests/lib-reftable.c @@ -2,8 +2,9 @@ #include "test-lib.h" #include "reftable/constants.h" #include "reftable/writer.h" +#include "strbuf.h" -void t_reftable_set_hash(uint8_t *p, int i, uint32_t id) +void t_reftable_set_hash(uint8_t *p, int i, enum reftable_hash id) { memset(p, (uint8_t)i, hash_size(id)); } @@ -82,7 +83,7 @@ void t_reftable_write_to_buf(struct reftable_buf *buf, size_t off = i * (opts.block_size ? opts.block_size : DEFAULT_BLOCK_SIZE); if (!off) - off = header_size(opts.hash_id == GIT_SHA256_FORMAT_ID ? 2 : 1); + off = header_size(opts.hash_id == REFTABLE_HASH_SHA256 ? 2 : 1); check_char(buf->buf[off], ==, 'r'); } |
