jj/cli
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
..
examples
src merge_tools: create builtin diff editor 2023-08-30 05:38:10 -04:00
testing
tests merged_trees: consider conflict-format-change-only commits empty 2023-08-30 06:17:21 -07:00
build.rs
Cargo.toml merge_tools: create builtin diff editor 2023-08-30 05:38:10 -04:00