Merge branch 'rr/doc-merge-strategies'
[gitweb.git] / Documentation / merge-strategies.txt
index 81e349309c315e2735177c094564b9825e5b3352..7bbd19b30032ca76966cbcf44a0b5b738c8f5ced 100644 (file)
@@ -20,7 +20,7 @@ recursive::
        merged tree of the common ancestors and uses that as
        the reference tree for the 3-way merge.  This has been
        reported to result in fewer merge conflicts without
-       causing mis-merges by tests done on actual merge commits
+       causing mismerges by tests done on actual merge commits
        taken from Linux 2.6 kernel development history.
        Additionally this can detect and handle merges involving
        renames.  This is the default merge strategy when
@@ -113,3 +113,11 @@ subtree::
        match the tree structure of A, instead of reading the trees at
        the same level. This adjustment is also done to the common
        ancestor tree.
+
+With the strategies that use 3-way merge (including the default, 'recursive'),
+if a change is made on both branches, but later reverted on one of the
+branches, that change will be present in the merged result; some people find
+this behavior confusing.  It occurs because only the heads and the merge base
+are considered when performing a merge, not the individual commits.  The merge
+algorithm therefore considers the reverted change as no change at all, and
+substitutes the changed version instead.