3 # Copyright (c) 2019 Rohit Ashiwal
6 test_description='tests to ensure compatibility between am and interactive backends'
10 # This is a special case in which both am and interactive backends
11 # provide the same output. It was done intentionally because
12 # both the backends fall short of optimal behaviour.
13 test_expect_success 'setup' '
14 git checkout -b topic &&
15 q_to_tab >file <<-\EOF &&
21 git commit -m "add file" &&
27 git commit -am "update file" &&
30 git checkout --orphan master &&
31 sed -e "s/^|//" >file <<-\EOF &&
37 git commit -m "add file" &&
41 test_expect_success '--ignore-whitespace works with am backend' '
42 cat >expect <<-\EOF &&
47 test_must_fail git rebase main side &&
49 git rebase --ignore-whitespace main side &&
53 test_expect_success '--ignore-whitespace works with interactive backend' '
54 cat >expect <<-\EOF &&
59 test_must_fail git rebase --merge main side &&
61 git rebase --merge --ignore-whitespace main side &&