summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorLibravatar Han-Wen Nienhuys <hanwen@google.com>2021-10-07 20:25:15 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-08 10:45:48 -0700
commitd860c86ba545920342cbc507fc34af461ab99152 (patch)
tree1f81693c09348d1c1c78a464cbf207dd23145f36 /t/helper
parentreftable: add dump utility (diff)
downloadtgif-d860c86ba545920342cbc507fc34af461ab99152.tar.xz
Add "test-tool dump-reftable" command.
This command dumps individual tables or a stack of of tables. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-reftable.c5
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/t/helper/test-reftable.c b/t/helper/test-reftable.c
index 996da85f7b..26b03d7b78 100644
--- a/t/helper/test-reftable.c
+++ b/t/helper/test-reftable.c
@@ -14,3 +14,8 @@ int cmd__reftable(int argc, const char **argv)
tree_test_main(argc, argv);
return 0;
}
+
+int cmd__dump_reftable(int argc, const char **argv)
+{
+ return reftable_dump_main(argc, (char *const *)argv);
+}
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index f7c888ffda..338a57b104 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -61,6 +61,7 @@ static struct test_cmd cmds[] = {
{ "read-midx", cmd__read_midx },
{ "ref-store", cmd__ref_store },
{ "reftable", cmd__reftable },
+ { "dump-reftable", cmd__dump_reftable },
{ "regex", cmd__regex },
{ "repository", cmd__repository },
{ "revision-walking", cmd__revision_walking },
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 25f7746914..48cee1f4a2 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -19,6 +19,7 @@ int cmd__dump_cache_tree(int argc, const char **argv);
int cmd__dump_fsmonitor(int argc, const char **argv);
int cmd__dump_split_index(int argc, const char **argv);
int cmd__dump_untracked_cache(int argc, const char **argv);
+int cmd__dump_reftable(int argc, const char **argv);
int cmd__example_decorate(int argc, const char **argv);
int cmd__fast_rebase(int argc, const char **argv);
int cmd__genrandom(int argc, const char **argv);