summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2016-03-18 14:26:17 -0700
committerJunio C Hamano <gitster@pobox.com>2016-03-18 14:35:31 -0700
commit78ec240020db4bdd773830f3d41f4b4bdf9a4e2d (patch)
treef6cbb0cff1a0608a94b55d6cf3f391c2498dc01b /git-rebase.sh
parent047057bb4159533b3323003f89160588c9e61fbd (diff)
downloadgit-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 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index cf60c43908..0bf41ee72b 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -248,6 +248,7 @@ do
;;
--exec=*)
cmd="${cmd}exec ${1#--exec=}${LF}"
+ test -z "$interactive_rebase" && interactive_rebase=implied
;;
--interactive)
interactive_rebase=explicit
@@ -348,12 +349,6 @@ do
done
test $# -gt 2 && usage
-if test -n "$cmd" &&
- test "$interactive_rebase" != explicit
-then
- die "$(gettext "The --exec option must be used with the --interactive option")"
-fi
-
if test -n "$action"
then
test -z "$in_progress" && die "$(gettext "No rebase in progress?")"