*check_todo = !!(flags & EDIT_MSG);
if (!res && reword) {
fast_forward_edit:
- res = run_git_commit(NULL, reflog_action, opts, EDIT_MSG |
- VERIFY_MSG | AMEND_MSG |
- (flags & ALLOW_EMPTY));
+ /*
+ * To reword we amend the commit we just
+ * picked or fast-forwarded. As the commit has
+ * already been picked we want to use the same
+ * set of commit flags regardless of how we
+ * got here.
+ */
+ flags = EDIT_MSG | VERIFY_MSG | AMEND_MSG | ALLOW_EMPTY;
- res = run_git_commit(NULL, opts, flags);
++ res = run_git_commit(NULL, reflog_action, opts, flags);
*check_todo = 1;
}
}
struct replay_ctx *ctx = opts->ctx;
int res = 0, reschedule = 0;
- ctx->reflog_message = sequencer_reflog_action(opts);
if (opts->allow_ff)
- assert(!(opts->signoff || opts->no_commit ||
+ ASSERT(!(opts->signoff || opts->no_commit ||
opts->record_origin || should_edit(opts) ||
opts->committer_date_is_author_date ||
opts->ignore_date));