diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2013-12-08 20:40:27 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-09 13:42:40 -0800 |
commit | c5665000327388832fa8be0b3bf17669f672481b (patch) | |
tree | 74d9679a67a1fa97228c822be2bb5a82f099368d /Documentation/merge-strategies.txt | |
parent | 2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff) | |
download | git-c5665000327388832fa8be0b3bf17669f672481b.tar.gz git-c5665000327388832fa8be0b3bf17669f672481b.tar.xz |
Documentation: document pitfalls with 3-way merge
Oftentimes people will make the same change in two branches, revert the change
in one branch, and then be surprised when a merge reinstitutes that change when
the branches are merged. Add an explanatory paragraph that explains that this
occurs and the reason why, so people are not surprised.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/merge-strategies.txt')
-rw-r--r-- | Documentation/merge-strategies.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt index 49a9a7d53..fb6e593e7 100644 --- a/Documentation/merge-strategies.txt +++ b/Documentation/merge-strategies.txt @@ -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. |