Skip to content

Commit b966813

Browse files
committed
Merge branch 'js/rebase-i-redo-exec-fix'
For "rebase -i --reschedule-failed-exec", we do not want the "-y" shortcut after all. * js/rebase-i-redo-exec-fix: Revert "rebase: introduce a shortcut for --reschedule-failed-exec"
2 parents 87c9831 + e11ff89 commit b966813

File tree

4 files changed

+0
-36
lines changed

4 files changed

+0
-36
lines changed

Documentation/git-rebase.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,6 @@ without an explicit `--interactive`.
462462
+
463463
See also INCOMPATIBLE OPTIONS below.
464464

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-
471465
--root::
472466
Rebase all commits reachable from <branch>, instead of
473467
limiting them with an <upstream>. This allows you to rebase

builtin/rebase.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -941,23 +941,6 @@ static int parse_opt_interactive(const struct option *opt, const char *arg,
941941
return 0;
942942
}
943943

944-
struct opt_y {
945-
struct string_list *list;
946-
struct rebase_options *options;
947-
};
948-
949-
static int parse_opt_y(const struct option *opt, const char *arg, int unset)
950-
{
951-
struct opt_y *o = opt->value;
952-
953-
if (unset || !arg)
954-
return -1;
955-
956-
o->options->reschedule_failed_exec = 1;
957-
string_list_append(o->list, arg);
958-
return 0;
959-
}
960-
961944
static void NORETURN error_on_missing_default_upstream(void)
962945
{
963946
struct branch *current_branch = branch_get(NULL);
@@ -1051,7 +1034,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
10511034
struct string_list strategy_options = STRING_LIST_INIT_NODUP;
10521035
struct object_id squash_onto;
10531036
char *squash_onto_name = NULL;
1054-
struct opt_y opt_y = { .list = &exec, .options = &options };
10551037
struct option builtin_rebase_options[] = {
10561038
OPT_STRING(0, "onto", &options.onto_name,
10571039
N_("revision"),
@@ -1129,9 +1111,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
11291111
OPT_STRING_LIST('x', "exec", &exec, N_("exec"),
11301112
N_("add exec lines after each commit of the "
11311113
"editable list")),
1132-
{ OPTION_CALLBACK, 'y', NULL, &opt_y, N_("<cmd>"),
1133-
N_("same as --reschedule-failed-exec -x <cmd>"),
1134-
PARSE_OPT_NONEG, parse_opt_y },
11351114
OPT_BOOL(0, "allow-empty-message",
11361115
&options.allow_empty_message,
11371116
N_("allow rebasing commits with empty messages")),

git-legacy-rebase.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ f,force-rebase! cherry-pick all commits, even if unchanged
2626
m,merge! use merging strategies to rebase
2727
i,interactive! let the user edit the list of commits to rebase
2828
x,exec=! add exec lines after each commit of the editable list
29-
y=! same as --reschedule-failed-exec -x
3029
k,keep-empty preserve empty commits during rebase
3130
allow-empty-message allow rebasing commits with empty messages
3231
stat! display a diffstat of what changed upstream
@@ -261,11 +260,6 @@ do
261260
cmd="${cmd}exec ${1#--exec=}${LF}"
262261
test -z "$interactive_rebase" && interactive_rebase=implied
263262
;;
264-
-y*)
265-
reschedule_failed_exec=--reschedule-failed-exec
266-
cmd="${cmd}exec ${1#-y}${LF}"
267-
test -z "$interactive_rebase" && interactive_rebase=implied
268-
;;
269263
--interactive)
270264
interactive_rebase=explicit
271265
;;

t/t3418-rebase-continue.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,6 @@ test_expect_success '--reschedule-failed-exec' '
262262
test_must_fail git -c rebase.rescheduleFailedExec=true \
263263
rebase -x false HEAD^ 2>err &&
264264
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 &&
268265
test_i18ngrep "has been rescheduled" err
269266
'
270267

0 commit comments

Comments
 (0)