summaryrefslogtreecommitdiffstats
path: root/t/helper/test-reftable.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-reftable.c')
-rw-r--r--t/helper/test-reftable.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/helper/test-reftable.c b/t/helper/test-reftable.c
index 29d4e9a755..3c72ed985b 100644
--- a/t/helper/test-reftable.c
+++ b/t/helper/test-reftable.c
@@ -28,7 +28,10 @@ static int dump_table(struct reftable_merged_table *mt)
const struct git_hash_algo *algop;
int err;
- reftable_merged_table_init_ref_iterator(mt, &it);
+ err = reftable_merged_table_init_ref_iterator(mt, &it);
+ if (err < 0)
+ return err;
+
err = reftable_iterator_seek_ref(&it, "");
if (err < 0)
return err;
@@ -63,7 +66,10 @@ static int dump_table(struct reftable_merged_table *mt)
reftable_iterator_destroy(&it);
reftable_ref_record_release(&ref);
- reftable_merged_table_init_log_iterator(mt, &it);
+ err = reftable_merged_table_init_log_iterator(mt, &it);
+ if (err < 0)
+ return err;
+
err = reftable_iterator_seek_log(&it, "");
if (err < 0)
return err;
@@ -150,7 +156,7 @@ int cmd__dump_reftable(int argc, const char **argv)
int opt_dump_blocks = 0;
int opt_dump_table = 0;
int opt_dump_stack = 0;
- uint32_t opt_hash_id = GIT_SHA1_FORMAT_ID;
+ uint32_t opt_hash_id = REFTABLE_HASH_SHA1;
const char *arg = NULL, *argv0 = argv[0];
for (; argc > 1; argv++, argc--)
@@ -161,7 +167,7 @@ int cmd__dump_reftable(int argc, const char **argv)
else if (!strcmp("-t", argv[1]))
opt_dump_table = 1;
else if (!strcmp("-6", argv[1]))
- opt_hash_id = GIT_SHA256_FORMAT_ID;
+ opt_hash_id = REFTABLE_HASH_SHA256;
else if (!strcmp("-s", argv[1]))
opt_dump_stack = 1;
else if (!strcmp("-?", argv[1]) || !strcmp("-h", argv[1])) {