Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
---
 sequencer.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sequencer.c b/sequencer.c
index 0233999389..cafd945e83 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1947,6 +1947,8 @@ static int pick_commits(struct todo_list *todo_list, 
struct replay_opts *opts)
                if (!stat(rebase_path_rewritten_list(), &st) &&
                                st.st_size > 0) {
                        struct child_process child = CHILD_PROCESS_INIT;
+                       const char *post_rewrite_hook =
+                               find_hook("post-rewrite");
 
                        child.in = open(rebase_path_rewritten_list(), O_RDONLY);
                        child.git_cmd = 1;
@@ -1955,6 +1957,18 @@ static int pick_commits(struct todo_list *todo_list, 
struct replay_opts *opts)
                        argv_array_push(&child.args, "--for-rewrite=rebase");
                        /* we don't care if this copying failed */
                        run_command(&child);
+
+                       if (post_rewrite_hook) {
+                               struct child_process hook = CHILD_PROCESS_INIT;
+
+                               hook.in = open(rebase_path_rewritten_list(),
+                                       O_RDONLY);
+                               hook.stdout_to_stderr = 1;
+                               argv_array_push(&hook.args, post_rewrite_hook);
+                               argv_array_push(&hook.args, "rebase");
+                               /* we don't care if this hook failed */
+                               run_command(&hook);
+                       }
                }
 
                strbuf_release(&buf);
-- 
2.11.0.rc3.windows.1


Reply via email to