]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ag/sequencer-todo-updates'
authorJunio C Hamano <gitster@pobox.com>
Mon, 16 Dec 2019 21:08:31 +0000 (13:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Dec 2019 21:08:31 +0000 (13:08 -0800)
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

1  2 
builtin/rebase.c
sequencer.c

index a11e15b86f932a00ab9ca00c0bd6c0faf3ed53c9,b171c86e3d86142df51bb77cfe6bbaab0bcd37b9..f82fe108780b29e99610f3ebf16df0f9156d0f86
@@@ -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;
  }
  
diff --cc sequencer.c
Simple merge