Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sequencer (rebase -i): run the post-rewrite hook, if needed
author
Johannes Schindelin
<johannes.schindelin@gmx.de>
Mon, 2 Jan 2017 15:28:23 +0000
(16:28 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 Jan 2017 22:57:30 +0000
(14:57 -0800)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ca98c6d
)
diff --git
a/sequencer.c
b/sequencer.c
index d7273fd1b3d850906bba758437da67314c0eb707..43ced8db31adbce1b92b4f438319c1993ba4b43e 100644
(file)
--- a/
sequencer.c
+++ b/
sequencer.c
@@
-1957,6
+1957,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;
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;
child.in = open(rebase_path_rewritten_list(), O_RDONLY);
child.git_cmd = 1;
@@
-1965,6
+1967,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);
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);
}
strbuf_release(&buf);