The to-do list command `reword` replays a commit like `pick` but lets
the user also edit the commit's log message. If one thinks of `pick`
entries as scheduled `cherry-pick` command lines, then `reword`
becomes an alias for the command line `cherry-pick --edit`. The
porcelain `rebase--interactive` defines a function `do_pick` for
processing the `pick` entries on to-do lists. Reimplement `reword` in
terms of `do_pick --edit`.

If the user picks a commit using the to-do list line

    reword fa1afe1 Some change

execute the command `do_pick --edit fa1afe1 "Some change"` which
carries out exactly the same steps as the case arm for `reword` in
`do_next` so far.

Signed-off-by: Fabian Ruch <>
--- | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ b/
index 8a89ced..2d768b3 100644
--- a/
+++ b/
@@ -546,11 +546,7 @@ do_next () {
                comment_for_reflog reword
-               do_pick $sha1 "$rest"
-               output git commit --allow-empty --amend --no-post-rewrite 
--no-pre-commit ${gpg_sign_opt:+"$gpg_sign_opt"} || {
-                       warn "Could not amend commit after successfully picking 
$sha1... $rest"
-                       exit_with_patch $sha1 1
-               }
+               do_pick --edit $sha1 "$rest"
                record_in_rewritten $sha1

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to