]> git.ipfire.org Git - thirdparty/git.git/commitdiff
sequencer (rebase -i): set the reflog message consistently
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 2 Jan 2017 15:28:13 +0000 (16:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 22:57:30 +0000 (14:57 -0800)
We already used the same reflog message as the scripted version of rebase
-i when finishing. With this commit, we do that also for all the commands
before that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c

index 0d8e11f5800ed90c2d07949dd8099fe5ba23980d..95ae4bcd1e90cad5d4937c17276348aa01fbf949 100644 (file)
@@ -1785,6 +1785,10 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
                        unlink(rebase_path_amend());
                }
                if (item->command <= TODO_SQUASH) {
+                       if (is_rebase_i(opts))
+                               setenv("GIT_REFLOG_ACTION", reflog_message(opts,
+                                       command_to_string(item->command), NULL),
+                                       1);
                        res = do_pick_commit(item->command, item->commit,
                                        opts, is_final_fixup(todo_list));
                        if (item->command == TODO_EDIT) {