3 test_description
='test if rebase detects and aborts on incompatible options'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'setup' '
22 echo "q qfoo();" | q_to_tab >>foo &&
28 # Rebase has lots of useful options like --whitepsace=fix, which are
29 # actually all built in terms of flags to git-am. Since neither
30 # --merge nor --interactive (nor any options that imply those two) use
31 # git-am, using them together will result in flags like --whitespace=fix
32 # being ignored. Make sure rebase warns the user and aborts instead.
35 test_rebase_am_only
() {
38 test_expect_success
"$opt incompatible with --merge" "
40 test_must_fail git rebase $opt --merge A
43 test_expect_success
"$opt incompatible with --strategy=ours" "
45 test_must_fail git rebase $opt --strategy=ours A
48 test_expect_success
"$opt incompatible with --strategy-option=ours" "
50 test_must_fail git rebase $opt --strategy-option=ours A
53 test_expect_success
"$opt incompatible with --interactive" "
55 test_must_fail git rebase $opt --interactive A
58 test_expect_success
"$opt incompatible with --exec" "
60 test_must_fail git rebase $opt --exec 'true' A
65 test_rebase_am_only
--whitespace=fix
66 test_rebase_am_only
-C4