aboutsummaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorBenoit Pierre <benoit.pierre@gmail.com>2014-03-18 11:00:53 +0100
committerJunio C Hamano <gitster@pobox.com>2014-03-18 11:25:12 -0700
commit15048f8a9ace23df67161746ca76b4f46114deee (patch)
tree5b7d00d2da24c8e31ede5d028b889bf06a63aaaf /builtin/merge.c
parent91c9c8692056c0553c6ea9239ccd46f7f3dbd877 (diff)
downloadgit-15048f8a9ace23df67161746ca76b4f46114deee.tar.gz
git-15048f8a9ace23df67161746ca76b4f46114deee.tar.xz
commit: fix patch hunk editing with "commit -p -m"
Don't change git environment: move the GIT_EDITOR=":" override to the hook command subprocess, like it's already done for GIT_INDEX_FILE. Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index e576a7fdc..67f312d87 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -421,7 +421,7 @@ static void finish(struct commit *head_commit,
}
/* Run a post-merge hook */
- run_hook(NULL, "post-merge", squash ? "1" : "0", NULL);
+ run_hook_le(NULL, "post-merge", squash ? "1" : "0", NULL);
strbuf_release(&reflog_message);
}
@@ -821,8 +821,8 @@ static void prepare_to_commit(struct commit_list *remoteheads)
if (0 < option_edit)
strbuf_commented_addf(&msg, _(merge_editor_comment), comment_line_char);
write_merge_msg(&msg);
- if (run_hook(get_index_file(), "prepare-commit-msg",
- git_path("MERGE_MSG"), "merge", NULL, NULL))
+ if (run_commit_hook(1, get_index_file(), "prepare-commit-msg",
+ git_path("MERGE_MSG"), "merge", NULL))
abort_commit(remoteheads, NULL);
if (0 < option_edit) {
if (launch_editor(git_path("MERGE_MSG"), NULL, NULL))