t/t4*: merge a "grep | sed" pipeline
[git.git] / t / t6425-merge-rename-delete.sh
blobb95b064311b6762da86c6239a93651edd9dede78
1 #!/bin/sh
3 test_description='Merge-recursive rename/delete conflict message'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7 TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
10 test_expect_success 'rename/delete' '
11 echo foo >A &&
12 git add A &&
13 git commit -m "initial" &&
15 git checkout -b rename &&
16 git mv A B &&
17 git commit -m "rename" &&
19 git checkout main &&
20 git rm A &&
21 git commit -m "delete" &&
23 test_must_fail git merge --strategy=recursive rename >output &&
24 test_grep "CONFLICT (rename/delete): A.* renamed .*to B.* in rename" output &&
25 test_grep "CONFLICT (rename/delete): A.*deleted in HEAD." output
28 test_done