Revert "rebase: introduce a shortcut for --reschedule-failed-exec"

This patch was contributed only as a tentative "we could introduce a convenient short option if we do not want to change the default behavior in the long run" patch, opening the discussion whether other people agree with deprecating the current behavior in favor of the rescheduling behavior. But the consensus on the Git mailing list was that it would make sense to show a warning in the near future, and flip the default rebase.rescheduleFailedExec to reschedule failed `exec` commands by default. See e.g. <CAGZ79kZL5CRqCDRb6B-EedUm8Z_i4JuSF2=UtwwdRXMitrrOBw@mail.gmail.com> So let's back out that patch that added the `-y` short option that we agreed was not necessary or desirable. This reverts commit 81ef8ee75d5f348d3c71ff633d13d302124e1a5e. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Feb 6, 2019 at 10:45 UTC e11ff8975bedc0aae82632c3cb72578c3d7fc0b2
4 files changed -36
Documentation/git-rebase.txt
-6
@@ -462,12 +462,6 @@ without an explicit `--interactive`.
462 +
463 See also INCOMPATIBLE OPTIONS below.
464
465 --y <cmd>::
466 - This is the same as passing `--reschedule-failed-exec` before
467 - `-x <cmd>`, i.e. it appends the specified `exec` command and
468 - turns on the mode where failed `exec` commands are automatically
469 - rescheduled.
470 -
465 --root::
466 Rebase all commits reachable from <branch>, instead of
467 limiting them with an <upstream>. This allows you to rebase
builtin/rebase.c
-21
@@ -754,23 +754,6 @@ static int parse_opt_interactive(const struct option *opt, const char *arg,
754 return 0;
755 }
756
757 -struct opt_y {
758 - struct string_list *list;
759 - struct rebase_options *options;
760 -};
761 -
762 -static int parse_opt_y(const struct option *opt, const char *arg, int unset)
763 -{
764 - struct opt_y *o = opt->value;
765 -
766 - if (unset || !arg)
767 - return -1;
768 -
769 - o->options->reschedule_failed_exec = 1;
770 - string_list_append(o->list, arg);
771 - return 0;
772 -}
773 -
757 static void NORETURN error_on_missing_default_upstream(void)
758 {
759 struct branch *current_branch = branch_get(NULL);
@@ -851,7 +834,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
834 struct string_list strategy_options = STRING_LIST_INIT_NODUP;
835 struct object_id squash_onto;
836 char *squash_onto_name = NULL;
854 - struct opt_y opt_y = { .list = &exec, .options = &options };
837 struct option builtin_rebase_options[] = {
838 OPT_STRING(0, "onto", &options.onto_name,
839 N_("revision"),
@@ -929,9 +911,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
911 OPT_STRING_LIST('x', "exec", &exec, N_("exec"),
912 N_("add exec lines after each commit of the "
913 "editable list")),
932 - { OPTION_CALLBACK, 'y', NULL, &opt_y, N_("<cmd>"),
933 - N_("same as --reschedule-failed-exec -x <cmd>"),
934 - PARSE_OPT_NONEG, parse_opt_y },
914 OPT_BOOL(0, "allow-empty-message",
915 &options.allow_empty_message,
916 N_("allow rebasing commits with empty messages")),
git-legacy-rebase.sh
-6
@@ -26,7 +26,6 @@ f,force-rebase! cherry-pick all commits, even if unchanged
26 m,merge! use merging strategies to rebase
27 i,interactive! let the user edit the list of commits to rebase
28 x,exec=! add exec lines after each commit of the editable list
29 -y=! same as --reschedule-failed-exec -x
29 k,keep-empty preserve empty commits during rebase
30 allow-empty-message allow rebasing commits with empty messages
31 stat! display a diffstat of what changed upstream
@@ -263,11 +262,6 @@ do
262 cmd="${cmd}exec ${1#--exec=}${LF}"
263 test -z "$interactive_rebase" && interactive_rebase=implied
264 ;;
266 - -y*)
267 - reschedule_failed_exec=--reschedule-failed-exec
268 - cmd="${cmd}exec ${1#-y}${LF}"
269 - test -z "$interactive_rebase" && interactive_rebase=implied
270 - ;;
265 --interactive)
266 interactive_rebase=explicit
267 ;;
t/t3418-rebase-continue.sh
-3
@@ -262,9 +262,6 @@ test_expect_success '--reschedule-failed-exec' '
262 test_must_fail git -c rebase.rescheduleFailedExec=true \
263 rebase -x false HEAD^ 2>err &&
264 grep "^exec false" .git/rebase-merge/git-rebase-todo &&
265 - test_i18ngrep "has been rescheduled" err &&
266 - git rebase --abort &&
267 - test_must_fail git rebase -y false HEAD^ 2>err &&
265 test_i18ngrep "has been rescheduled" err
266 '
267