diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-07-01 04:58:15 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-07-01 09:43:49 -0700 |
| commit | 906b63942ac7f0ff904228b03d5dbe1edc59f0fe (patch) | |
| tree | 7941eaf932a5d1d4f512a14e3520b2e547afc5b6 /builtin/rebase.c | |
| parent | e11ff8975bedc0aae82632c3cb72578c3d7fc0b2 (diff) | |
| download | git-906b63942ac7f0ff904228b03d5dbe1edc59f0fe.tar.gz | |
rebase --am: ignore rebase.rescheduleFailedExec
The `exec` command is specific to the interactive backend, therefore it
does not make sense for non-interactive rebases to heed that config
setting.
We still want to error out if a non-interactive rebase is started with
`--reschedule-failed-exec`, of course.
Reported by Vas Sudanagunta via:
https://github.com/git/git/commit/969de3ff0e0#commitcomment-33257187
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
| -rw-r--r-- | builtin/rebase.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 4839e52555..b33d7f74d6 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -834,6 +834,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) struct string_list strategy_options = STRING_LIST_INIT_NODUP; struct object_id squash_onto; char *squash_onto_name = NULL; + int reschedule_failed_exec = -1; struct option builtin_rebase_options[] = { OPT_STRING(0, "onto", &options.onto_name, N_("revision"), @@ -929,7 +930,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) OPT_BOOL(0, "root", &options.root, N_("rebase all reachable commits up to the root(s)")), OPT_BOOL(0, "reschedule-failed-exec", - &options.reschedule_failed_exec, + &reschedule_failed_exec, N_("automatically re-schedule any `exec` that fails")), OPT_END(), }; @@ -1227,8 +1228,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) break; } - if (options.reschedule_failed_exec && !is_interactive(&options)) - die(_("--reschedule-failed-exec requires an interactive rebase")); + if (reschedule_failed_exec > 0 && !is_interactive(&options)) + die(_("--reschedule-failed-exec requires " + "--exec or --interactive")); + if (reschedule_failed_exec >= 0) + options.reschedule_failed_exec = reschedule_failed_exec; if (options.git_am_opts.argc) { /* all am options except -q are compatible only with --am */ |
