I've seen many blog posts and stack overflow posts say that
git config --global diff.algorithm patience
will allow both diffs and merges to use the patience strategy option with the default recursive algorithm.
I have found this to not be the case, and I pose the following demo to show why not.
git config --global diff.algorithm patience //mythical config statement
git clone https://github.com/kjlubick/PracticingGit.git
cd PracticingGit
git checkout origin/patience-merge-1 -t
git checkout -b merge_test //temp branch for merging
git diff origin/patience-merge-2
This diff (image courtesy of meld looks pretty good. Let's try to merge it in.
git merge origin/patience-merge-2
Huh? That merge looks ugly. Despite lines 9-19 not actually changing, they are marked as conflicted/changed in completely different way than with the diff.
If we force the merge to use the patience strategy option:
git merge --abort
git merge origin/patience-merge-2 -X patience
That's much better. The conflicts match up with the diff we made earlier and are semantically correct.
How can I make merging actually use the patience setting, not just diffs?
Additional shots in the dark I tried (unsuccessfully):
git config --global merge.algorithm patience
git config --global merge.diff.algorithm patience
System info:
Windows 8.1
git version 1.8.4.msysgit.0 (via GitHub for Windows 2.0)