diff options
author | Stefan Beller <sbeller@google.com> | 2016-03-18 14:26:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-18 14:35:31 -0700 |
commit | 78ec240020db4bdd773830f3d41f4b4bdf9a4e2d (patch) | |
tree | f6cbb0cff1a0608a94b55d6cf3f391c2498dc01b /t | |
parent | 047057bb4159533b3323003f89160588c9e61fbd (diff) | |
download | git-78ec240020db4bdd773830f3d41f4b4bdf9a4e2d.tar.gz |
rebase: decouple --exec from --interactive
In the later steps of preparing a patch series I do not want to
edit or reorder the patches any more, but just make sure the
test suite passes after each patch and also to fix breakage
right there if some of the steps fail. I could run
EDITOR=true git rebase -i <anchor> -x "make test"
but it would be simpler if it can be spelled like so:
git rebase <anchor> -x "make test"
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 544f9ad508..21b1f95025 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -876,16 +876,15 @@ test_expect_success 'rebase -ix with --autosquash' ' test_cmp expected actual ' - -test_expect_success 'rebase --exec without -i shows error message' ' +test_expect_success 'rebase --exec works without -i ' ' git reset --hard execute && - set_fake_editor && - test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual && - echo "The --exec option must be used with the --interactive option" >expected && - test_i18ncmp expected actual + rm -rf exec_output && + EDITOR="echo >invoked_editor" git rebase --exec "echo a line >>exec_output" HEAD~2 2>actual && + test_i18ngrep "Successfully rebased and updated" actual && + test_line_count = 2 exec_output && + test_path_is_missing invoked_editor ' - test_expect_success 'rebase -i --exec without <CMD>' ' git reset --hard execute && set_fake_editor && |