forked from mirrors/jj
conflicts: always promote legacy trees to merged trees
In order to remove the `MergedTree::Legacy` form, we need to stop creating such instances. This patch removes the last place we create them, which is in `Store::get_root_tree()`. The main practical consequence of this change is that loading legacy trees gets a lot slower on large repos. However, since the default log template includes the `conflict` keyword, we ended up scanning all paths in `jj log` anyway, so I'm not sure many people will notice.
This commit is contained in:
parent
202fb533f4
commit
0590f8bece
1 changed files with 1 additions and 1 deletions
|
@ -200,7 +200,7 @@ impl Store {
|
|||
match &id {
|
||||
MergedTreeId::Legacy(id) => {
|
||||
let tree = self.get_tree(RepoPath::root(), id)?;
|
||||
Ok(MergedTree::Legacy(tree))
|
||||
MergedTree::from_legacy_tree(tree)
|
||||
}
|
||||
MergedTreeId::Merge(ids) => {
|
||||
let trees = ids.try_map(|id| self.get_tree(RepoPath::root(), id))?;
|
||||
|
|
Loading…
Reference in a new issue