Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 0a3beb0

Browse files
benoit-pierregitster
authored andcommitted
merge: fix GIT_EDITOR override for commit hook
Don't set GIT_EDITOR to ":" when calling prepare-commit-msg hook if the editor is going to be called (e.g. with "merge -e"). Signed-off-by: Benoit Pierre <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 15048f8 commit 0a3beb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ static void prepare_to_commit(struct commit_list *remoteheads)
821821
if (0 < option_edit)
822822
strbuf_commented_addf(&msg, _(merge_editor_comment), comment_line_char);
823823
write_merge_msg(&msg);
824-
if (run_commit_hook(1, get_index_file(), "prepare-commit-msg",
824+
if (run_commit_hook(0 < option_edit, get_index_file(), "prepare-commit-msg",
825825
git_path("MERGE_MSG"), "merge", NULL))
826826
abort_commit(remoteheads, NULL);
827827
if (0 < option_edit) {

0 commit comments

Comments
 (0)