From abf77c81e693181dd40a938743262f9f824c7e70 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 9 Jun 2024 19:32:04 -0700 Subject: [PATCH] tests: make helpers create non-legacy trees Extracted and modified from #3746 by @ilyagr. --- lib/tests/test_local_working_copy.rs | 2 +- lib/testutils/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/test_local_working_copy.rs b/lib/tests/test_local_working_copy.rs index 361aa7aed74..c09b3283873 100644 --- a/lib/tests/test_local_working_copy.rs +++ b/lib/tests/test_local_working_copy.rs @@ -969,7 +969,7 @@ fn test_gitignores_ignored_directory_already_tracked() { } } let id = tree_builder.write_tree().unwrap(); - MergedTree::legacy(store.get_tree(RepoPath::root(), &id).unwrap()) + MergedTree::resolved(store.get_tree(RepoPath::root(), &id).unwrap()) }; let gitignore_path = RepoPath::from_internal_string(".gitignore"); diff --git a/lib/testutils/src/lib.rs b/lib/testutils/src/lib.rs index 1eba76252b5..e5283d1b91f 100644 --- a/lib/testutils/src/lib.rs +++ b/lib/testutils/src/lib.rs @@ -326,7 +326,7 @@ pub fn create_single_tree(repo: &Arc, path_contents: &[(&RepoPath, } pub fn create_tree(repo: &Arc, path_contents: &[(&RepoPath, &str)]) -> MergedTree { - MergedTree::legacy(create_single_tree(repo, path_contents)) + MergedTree::resolved(create_single_tree(repo, path_contents)) } #[must_use]