tests: make helpers create non-legacy trees

Extracted and modified from #3746 by @ilyagr.
This commit is contained in:
Martin von Zweigbergk 2024-06-09 19:32:04 -07:00 committed by Martin von Zweigbergk
parent bafb357209
commit 352ca72314
2 changed files with 2 additions and 2 deletions

View file

@ -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");

View file

@ -326,7 +326,7 @@ pub fn create_single_tree(repo: &Arc<ReadonlyRepo>, path_contents: &[(&RepoPath,
}
pub fn create_tree(repo: &Arc<ReadonlyRepo>, path_contents: &[(&RepoPath, &str)]) -> MergedTree {
MergedTree::legacy(create_single_tree(repo, path_contents))
MergedTree::resolved(create_single_tree(repo, path_contents))
}
#[must_use]