Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
merge: fix GIT_EDITOR override for commit hook
author
Benoit Pierre
<benoit.pierre@gmail.com>
Tue, 18 Mar 2014 10:00:54 +0000
(11:00 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 18 Mar 2014 18:25:38 +0000
(11:25 -0700)
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>
builtin/merge.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
15048f8
)
diff --git
a/builtin/merge.c
b/builtin/merge.c
index 67f312d877c0db248d1268ea8bda29eb61fe4ca4..b11a528ce5580d5e5b9b61f291e0d829a735ae6a 100644
(file)
--- 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) {