3 test_description
='rebase behavior when on-disk files are broken'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'set up conflicting branches' '
9 test_commit base file &&
10 git checkout -b branch1 &&
11 test_commit one file &&
12 git checkout -b branch2 HEAD^ &&
17 test_when_finished
"git rebase --abort" &&
18 git checkout
-B tmp branch2
&&
19 test_must_fail git rebase branch1
22 check_resolve_fails
() {
23 echo resolved
>file &&
25 test_must_fail git rebase
--continue
28 for item
in NAME EMAIL DATE
30 test_expect_success
"detect missing GIT_AUTHOR_$item" '
33 grep -v $item .git/rebase-merge/author-script >tmp &&
34 mv tmp .git/rebase-merge/author-script &&
40 for item
in NAME EMAIL DATE
42 test_expect_success
"detect duplicate GIT_AUTHOR_$item" '
45 grep -i $item .git/rebase-merge/author-script >tmp &&
46 cat tmp >>.git/rebase-merge/author-script &&
52 test_expect_success
'unknown key in author-script' '
55 echo "GIT_AUTHOR_BOGUS=${SQ}whatever${SQ}" \
56 >>.git/rebase-merge/author-script &&