From c92b46587df5e88c0ee74df71b6a46b39a5029af Mon Sep 17 00:00:00 2001 From: William Ting Date: Sat, 30 Apr 2016 20:35:33 -0700 Subject: [PATCH] Add diff3 conflictstyle support for git merge conflicts. --- tests/check_merge_conflict_test.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/check_merge_conflict_test.py b/tests/check_merge_conflict_test.py index 3d719bd..07805b1 100644 --- a/tests/check_merge_conflict_test.py +++ b/tests/check_merge_conflict_test.py @@ -37,12 +37,21 @@ def f1_is_a_conflict_file(in_tmpdir): cmd_output('git', 'commit', '-am', 'clone commit2') cmd_output('git', 'pull', retcode=None) # We should end up in a merge conflict! - assert io.open('f1').read().startswith( + f1 = io.open('f1').read() + assert f1.startswith( '<<<<<<< HEAD\n' 'child\n' '=======\n' 'parent\n' '>>>>>>>' + ) or f1.startswith( + '<<<<<<< HEAD\n' + 'child\n' + # diff3 conflict style git merges add this line: + '||||||| merged common ancestors\n' + '=======\n' + 'parent\n' + '>>>>>>>' ) assert os.path.exists(os.path.join('.git', 'MERGE_MSG')) yield