3 # Based on a test case submitted by Björn Steinbrink.
5 test_description
='git blame on conflicted files'
8 test_expect_success
'setup first case' '
10 echo "Old line" > file1 &&
12 git commit --author "Old Line <ol@localhost>" -m file1.a &&
15 git checkout -b foo &&
17 # Do an ugly move and change
19 echo "New line ..." > file2 &&
20 echo "... and more" >> file2 &&
22 git commit --author "U Gly <ug@localhost>" -m ugly &&
24 # Back to master and change something
25 git checkout master &&
29 git commit --author "Old Line <ol@localhost>" -a -m file1.b &&
31 # Back to foo and merge master
33 if git merge master; then
34 echo needed conflict here
37 echo merge failed - resolving automatically
45 git commit --author "M Result <mr@localhost>" -a -m merged &&
47 # Back to master and change file1 again
48 git checkout master &&
49 sed s/bla/foo/ <file1 >X &&
52 git commit --author "No Bla <nb@localhost>" -a -m replace &&
54 # Try to merge into foo again
56 if git merge master; then
57 echo needed conflict here
60 echo merge failed - test is setup
65 'blame runs on unconflicted file while other file has conflicts' '
69 test_expect_success
'blame runs on conflicted file in stages 1,3' '