@@ -771,7 +771,6 @@ test_expect_success 'rebase-i history with funny messages' '
771771 test_cmp expect actual
772772'
773773
774-
775774test_expect_success ' prepare for rebase -i --exec' '
776775 git checkout master &&
777776 git checkout -b execute &&
@@ -780,7 +779,6 @@ test_expect_success 'prepare for rebase -i --exec' '
780779 test_commit three_exec main.txt three_exec
781780'
782781
783-
784782test_expect_success ' running "git rebase -i --exec git show HEAD"' '
785783 set_fake_editor &&
786784 git rebase -i --exec "git show HEAD" HEAD~2 >actual &&
@@ -793,7 +791,6 @@ test_expect_success 'running "git rebase -i --exec git show HEAD"' '
793791 test_cmp expected actual
794792'
795793
796-
797794test_expect_success ' running "git rebase --exec git show HEAD -i"' '
798795 git reset --hard execute &&
799796 set_fake_editor &&
@@ -807,7 +804,6 @@ test_expect_success 'running "git rebase --exec git show HEAD -i"' '
807804 test_cmp expected actual
808805'
809806
810-
811807test_expect_success ' running "git rebase -ix git show HEAD"' '
812808 git reset --hard execute &&
813809 set_fake_editor &&
@@ -835,7 +831,6 @@ test_expect_success 'rebase -ix with several <CMD>' '
835831 test_cmp expected actual
836832'
837833
838-
839834test_expect_success ' rebase -ix with several instances of --exec' '
840835 git reset --hard execute &&
841836 set_fake_editor &&
@@ -850,7 +845,6 @@ test_expect_success 'rebase -ix with several instances of --exec' '
850845 test_cmp expected actual
851846'
852847
853-
854848test_expect_success ' rebase -ix with --autosquash' '
855849 git reset --hard execute &&
856850 git checkout -b autosquash &&
@@ -876,16 +870,15 @@ test_expect_success 'rebase -ix with --autosquash' '
876870 test_cmp expected actual
877871'
878872
879-
880- test_expect_success ' rebase --exec without -i shows error message' '
873+ test_expect_success ' rebase --exec works without -i ' '
881874 git reset --hard execute &&
882- set_fake_editor &&
883- test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual &&
884- echo "The --exec option must be used with the --interactive option" >expected &&
885- test_i18ncmp expected actual
875+ rm -rf exec_output &&
876+ EDITOR="echo >invoked_editor" git rebase --exec "echo a line >>exec_output" HEAD~2 2>actual &&
877+ test_i18ngrep "Successfully rebased and updated" actual &&
878+ test_line_count = 2 exec_output &&
879+ test_path_is_missing invoked_editor
886880'
887881
888-
889882test_expect_success ' rebase -i --exec without <CMD>' '
890883 git reset --hard execute &&
891884 set_fake_editor &&
0 commit comments