Skip to content

Commit 0067272

Browse files
committed
Merge branch 'bc/doc-merge-no-op-revert'
* bc/doc-merge-no-op-revert: Documentation: document pitfalls with 3-way merge
2 parents 4d1826d + c566500 commit 0067272

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Documentation/merge-strategies.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,11 @@ subtree::
113113
match the tree structure of A, instead of reading the trees at
114114
the same level. This adjustment is also done to the common
115115
ancestor tree.
116+
117+
With the strategies that use 3-way merge (including the default, 'recursive'),
118+
if a change is made on both branches, but later reverted on one of the
119+
branches, that change will be present in the merged result; some people find
120+
this behavior confusing. It occurs because only the heads and the merge base
121+
are considered when performing a merge, not the individual commits. The merge
122+
algorithm therefore considers the reverted change as no change at all, and
123+
substitutes the changed version instead.

0 commit comments

Comments
 (0)