| test_description='basic work tree status reporting' |
| test_expect_success setup ' |
| test_commit B oneside added && |
| test_commit C oneside created |
| test_expect_success 'A/A conflict' ' |
| test_must_fail git merge C |
| test_expect_success 'Report path with conflict' ' |
| git diff --cached --name-status >actual && |
| echo "U oneside" >expect && |
| test_expect_success 'Report new path with conflict' ' |
| git diff --cached --name-status HEAD^ >actual && |
| echo "U oneside" >expect && |
| # (use "git reset HEAD <file>..." to unstage) |
| # (use "git add <file>..." to mark resolution) |
| no changes added to commit (use "git add" and/or "git commit -a") |
| test_expect_success 'M/D conflict does not segfault' ' |
| test_commit initial foo "" && |
| test_commit modify foo foo && |
| git checkout -b side HEAD^ && |
| test_must_fail git merge master && |
| test_must_fail git status > ../actual |