ok/jj
1
0
Fork 0
forked from mirrors/jj

merged_tree: make resolve() on legacy tree an error

The current implementation of `resolve()` on legacy trees just
pretended any conflicts were regular files. It's better to error
out. The function is only used in tests so far.
This commit is contained in:
Martin von Zweigbergk 2024-05-31 15:06:54 -07:00 committed by Martin von Zweigbergk
parent 660a917aaa
commit 6ab9d7bdc7

View file

@ -187,7 +187,7 @@ impl MergedTree {
/// the input.
pub fn resolve(&self) -> BackendResult<Merge<Tree>> {
match self {
MergedTree::Legacy(tree) => Ok(Merge::resolved(tree.clone())),
MergedTree::Legacy(_) => panic!("Cannot resolve conflicts in legacy tree"),
MergedTree::Merge(trees) => merge_trees(trees),
}
}