15 ms·
Note also that three-way merge is not an associative operation which can sometimes lead to some surprising behaviors, https://winddy.buzz/manual/why_pijul.html
by crdrost 3y ago
Note also that three-way merge is not an associative operation which can sometimes lead to some surprising behaviors, https://winddy.buzz/manual/why_pijul.html https://winddy.buzz/manual/why_pijul.html
- not2b 3y agoA major source of conflicts I see in development might be resolved if we had something like a four-way merge. Consider this case: we have a base version, and two changes have been applied to that version. Change 1 adds a function at a given position in a file. Change 2 adds a different function at the same position. But we want both functions to exist in the final result. Suppose the release branch starts with the release version, and then change 2 is merged. Now we try to merge change 1. We get a conflict because the merge is at the same point. But if we could look at a fourth input (the state of the file on the development branch, or at the earliest state that has both change 1 and change 2 as predecessors), we could see that the resolution is to add both functions, in the order matching the order in the development branch. The four cases being considered are: the base version; the v1 change version (base + v1), the v2 change version (base + v2), and the earliest version that has both changes already applied.