ok/jj
1
0
Fork 0
forked from mirrors/jj
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 cargo: move examples/ into cli/ so they are part of the build again 2023-08-07 21:49:45 +00:00
src merge_tools: create builtin diff editor 2023-08-30 05:38:10 -04:00
testing fake_diff_editor: Allow specifying extra arguments to be ignored 2023-08-21 20:19:15 -07:00
tests merged_trees: consider conflict-format-change-only commits empty 2023-08-30 06:17:21 -07:00
build.rs build: update rerun-if conditions to watch .git/HEAD in colocated repo 2023-08-06 12:16:11 +09:00
Cargo.toml merge_tools: create builtin diff editor 2023-08-30 05:38:10 -04:00