diff options
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c index 407ee4e90f..ad0ab75c8d 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2510,9 +2510,15 @@ static int do_pick_commit(struct repository *r, *check_todo = !!(flags & EDIT_MSG); if (!res && reword) { fast_forward_edit: - res = run_git_commit(NULL, 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); *check_todo = 1; } } |