ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Martin von Zweigbergk 61501db8ec merged_trees: consider conflict-format-change-only commits empty
When we start writing tree-level conflicts in an existing repo, we
don't want commits that change the format to be non-empty if they
don't change any content. This patch updates `MergeTreeId::eq()` to
consider two resolved trees equal even if only their `MergedTreeId`
variant is different (one is path-level and one is tree-level).

I think I've gone through all places we compare tree ids and checked
that it's safe to compare them this way. One consequence is that
rebasing a commit without changing the parents (typically
auto-rebasing after `jj describe`) will not lead to the tree id
getting upgraded, due to an optimization we have for that case. I
don't think that's serious enough to handle specially; we'll have to
support the old format for existing repos for a while regardless of a
few commits not getting upgraded right away.

The number of failing tests with the config option enabled drop from
108 to 11 with this patch.
2023-08-30 06:17:21 -07:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos Use { workspace = true } to appease VS Code's Cargo.toml parser 2023-08-22 21:38:53 -07:00
src merged_trees: consider conflict-format-change-only commits empty 2023-08-30 06:17:21 -07:00
tests working_copy: use MergedTreeBuilder in test 2023-08-30 06:17:21 -07:00
testutils tests: make dump_tree() work with merged trees 2023-08-30 06:17:21 -07:00
Cargo.toml merged_tree: add diff iterator 2023-08-25 06:40:36 -07:00