Skip to content

v1.8.2 - merge's own real 3-way mode merge

Choose a tag to compare

@VectorSophie VectorSophie released this 15 Sep 07:27
· 37 commits to main since this release

Closes the "mode-only changes" gap in docs/ROADMAP-v1.8.md's "Complete three-way merge" section, and the real TODO Merge.HC's own header comment used to carry explicitly.

Mode is now a wholly separate 3-way decision from content inside MergeTreesRecursive (ADR 0011/0015 follow-up): a file's bytes and its mode can each change independently, each surviving entity's mode resolved base/ours/theirs the same way content already is. A genuine mode-only conflict (both sides changed mode, differently) is reported and aborts the whole merge exactly like a content conflict, not silently guessed. No format change needed - reuses the exact has_attrs/attrs_hash mechanism ADR 0015 already defined.

Verified standalone first (experiments/121-merge-mode-3way/, real QEMU/TempleOS execution): a clean mode-only round trip resolves to MERGE_OK with hgit diff on the merge commit showing DIFF_MODE_CHANGED file.txt 0 -> 2; a genuine mode-only conflict resolves to MERGE_CONFLICT/MERGE_ABORTED with HEAD provably byte-unchanged and a clean hgit check afterward. Full 86+-probe regression suite re-run end-to-end, clean.

One honest, narrower limitation left open: a mode-only change on the side a file gets deleted from isn't itself detected as a conflict (the existing edit-vs-delete decision only ever consults content). Documented in Merge.HC's own header and docs/adr/0011-merge.md.