Add diff3 conflictstyle support for git merge conflicts.

This commit is contained in:
William Ting 2016-04-30 20:35:33 -07:00
parent 6f2b0a27e5
commit c92b46587d

View file

@ -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