aboutsummaryrefslogtreecommitdiffstats
path: root/reftable/stack_test.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-08 10:18:43 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-08 10:18:43 -0700
commit5aec7231c8daabeca7cb2d3caa0ed0f88223f81e (patch)
treecfff1d955d7081ff68c3e383fcd9c8436004c893 /reftable/stack_test.c
parentd4cc1ec35f3bcce816b69986ca41943f6ce21377 (diff)
parentfa74f32291d0e2b642345d25e16724567f9b881f (diff)
downloadgit-5aec7231c8daabeca7cb2d3caa0ed0f88223f81e.tar.gz
Merge branch 'ps/reftable-write-optim'
Code to write out reftable has seen some optimization and simplification. * ps/reftable-write-optim: reftable/block: reuse compressed array reftable/block: reuse zstream when writing log blocks reftable/writer: reset `last_key` instead of releasing it reftable/writer: unify releasing memory reftable/writer: refactorings for `writer_flush_nonempty_block()` reftable/writer: refactorings for `writer_add_record()` refs/reftable: don't recompute committer ident reftable: remove name checks refs/reftable: skip duplicate name checks refs/reftable: perform explicit D/F check when writing symrefs refs/reftable: fix D/F conflict error message on ref copy
Diffstat (limited to 'reftable/stack_test.c')
-rw-r--r--reftable/stack_test.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/reftable/stack_test.c b/reftable/stack_test.c
index 1df3ffce52..7889f818d1 100644
--- a/reftable/stack_test.c
+++ b/reftable/stack_test.c
@@ -396,44 +396,6 @@ static void test_reftable_stack_auto_compaction_fails_gracefully(void)
clear_dir(dir);
}
-static void test_reftable_stack_validate_refname(void)
-{
- struct reftable_write_options cfg = { 0 };
- struct reftable_stack *st = NULL;
- int err;
- char *dir = get_tmp_dir(__LINE__);
-
- int i;
- struct reftable_ref_record ref = {
- .refname = "a/b",
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
- };
- char *additions[] = { "a", "a/b/c" };
-
- err = reftable_new_stack(&st, dir, cfg);
- EXPECT_ERR(err);
-
- err = reftable_stack_add(st, &write_test_ref, &ref);
- EXPECT_ERR(err);
-
- for (i = 0; i < ARRAY_SIZE(additions); i++) {
- struct reftable_ref_record ref = {
- .refname = additions[i],
- .update_index = 1,
- .value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
- };
-
- err = reftable_stack_add(st, &write_test_ref, &ref);
- EXPECT(err == REFTABLE_NAME_CONFLICT);
- }
-
- reftable_stack_destroy(st);
- clear_dir(dir);
-}
-
static int write_error(struct reftable_writer *wr, void *arg)
{
return *((int *)arg);
@@ -1105,7 +1067,6 @@ int stack_test_main(int argc, const char *argv[])
RUN_TEST(test_reftable_stack_auto_compaction_fails_gracefully);
RUN_TEST(test_reftable_stack_update_index_check);
RUN_TEST(test_reftable_stack_uptodate);
- RUN_TEST(test_reftable_stack_validate_refname);
RUN_TEST(test_suggest_compaction_segment);
RUN_TEST(test_suggest_compaction_segment_nothing);
return 0;