Merge branch 'pw/rebase-m-signoff-fix'

"git rebase --signoff" used to forget that it needs to add a
sign-off to the resulting commit when told to continue after a
conflict stops its operation.

* pw/rebase-m-signoff-fix:
  rebase -m: fix --signoff with conflicts
  sequencer: store commit message in private context
  sequencer: move current fixups to private context
  sequencer: start removing private fields from public API
  sequencer: always free "struct replay_opts"
This commit is contained in:
Junio C Hamano
2024-04-30 14:49:41 -07:00
4 changed files with 240 additions and 113 deletions

View File

@ -31,6 +31,9 @@ enum commit_msg_cleanup_mode {
COMMIT_MSG_CLEANUP_ALL
};
struct replay_ctx;
struct replay_ctx* replay_ctx_new(void);
struct replay_opts {
enum replay_action action;
@ -68,10 +71,6 @@ struct replay_opts {
/* Reflog */
char *reflog_action;
/* Used by fixup/squash */
struct strbuf current_fixups;
int current_fixup_count;
/* placeholder commit for -i --root */
struct object_id squash_onto;
int have_squash_onto;
@ -80,13 +79,13 @@ struct replay_opts {
struct rev_info *revs;
/* Private use */
const char *reflog_message;
struct replay_ctx *ctx;
};
#define REPLAY_OPTS_INIT { \
.edit = -1, \
.action = -1, \
.current_fixups = STRBUF_INIT, \
.xopts = STRVEC_INIT, \
.ctx = replay_ctx_new(), \
}
/*