summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorBenoit Pierre <benoit.pierre@gmail.com>2014-03-18 10:00:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-18 18:25:38 (GMT)
commit0a3beb0e2e29ca7a3c33a10112424650706edb5f (patch)
tree1147468aff216f1cdff0f2ecf3ee7aad8b297449 /builtin/merge.c
parent15048f8a9ace23df67161746ca76b4f46114deee (diff)
downloadgit-0a3beb0e2e29ca7a3c33a10112424650706edb5f.zip
git-0a3beb0e2e29ca7a3c33a10112424650706edb5f.tar.gz
git-0a3beb0e2e29ca7a3c33a10112424650706edb5f.tar.bz2
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 <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 67f312d..b11a528 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -821,7 +821,7 @@ 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_commit_hook(1, get_index_file(), "prepare-commit-msg",
+ if (run_commit_hook(0 < option_edit, get_index_file(), "prepare-commit-msg",
git_path("MERGE_MSG"), "merge", NULL))
abort_commit(remoteheads, NULL);
if (0 < option_edit) {