From: Junio C Hamano Date: Mon, 16 Dec 2019 21:08:31 +0000 (-0800) Subject: Merge branch 'ag/sequencer-todo-updates' X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=37c2619d91aa63d4c7c07b6f8de5ff2e1c2472b2;p=git.git Merge branch 'ag/sequencer-todo-updates' Reduce unnecessary reading of state variables back from the disk during sequencer operation. * ag/sequencer-todo-updates: sequencer: directly call pick_commits() from complete_action() rebase: fill `squash_onto' in get_replay_opts() sequencer: move the code writing total_nr on the disk to a new function sequencer: update `done_nr' when skipping commands in a todo list sequencer: update `total_nr' when adding an item to a todo list --- 37c2619d91aa63d4c7c07b6f8de5ff2e1c2472b2 diff --cc builtin/rebase.c index a11e15b86f,b171c86e3d..f82fe10878 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@@ -116,20 -112,16 +116,26 @@@ static struct replay_opts get_replay_op replay.allow_empty_message = opts->allow_empty_message; replay.verbose = opts->flags & REBASE_VERBOSE; replay.reschedule_failed_exec = opts->reschedule_failed_exec; + replay.committer_date_is_author_date = + opts->committer_date_is_author_date; + replay.ignore_date = opts->ignore_date; replay.gpg_sign = xstrdup_or_null(opts->gpg_sign_opt); replay.strategy = opts->strategy; + if (opts->strategy_opts) - parse_strategy_opts(&replay, opts->strategy_opts); + strbuf_addstr(&strategy_buf, opts->strategy_opts); + if (opts->ignore_whitespace) + strbuf_addstr(&strategy_buf, " --ignore-space-change"); + if (strategy_buf.len) + parse_strategy_opts(&replay, strategy_buf.buf); + + strbuf_release(&strategy_buf); + + if (opts->squash_onto) { + oidcpy(&replay.squash_onto, opts->squash_onto); + replay.have_squash_onto = 1; + } + return replay; }