sageserpent-open / kineticMerge

Merge a heavily refactored codebase and stay sane.
MIT License
12 stars 2 forks source link

Graceful handover of conflicts #2

Closed sageserpent-open closed 9 months ago

sageserpent-open commented 1 year ago

Where a merge does not encounter any code motion divergence, but conflicts are detected when sections of code are merged, then Kinetic Merge should write stage entries for Git for each file containing conflicts; and should also write the partially-merged form of the file at the expected path, with the usual three-way conflict markers in place.

The standard MERGE_HEAD ref should be set to refer to branch that the user is merging from, mirroring what git merge would do.

Where code motion causes the two sides of the conflict to originate from separate files, this should be reflected properly in the conflict markers, analogous to how Git represents conflicts caused where on branch has renamed an entire file. The situation is more subtle here, as code motion may simply move a section from one file to another; indeed the file with conflicts may have several conflicts involving several files rom which the conflicting sections were moved from.

Out of scope - conflicts caused by code motion on a section of code on one branch, and outright deletion of the same section in another branch. That is for a following story.

sageserpent-open commented 9 months ago

This ended being delivered as part of issue #1, when the application shell was being worked on.