[PATCH 5/7] merge: fix GIT_EDITOR override for commit hook

2014-03-18 Thread Benoit Pierre
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.pie...@gmail.com
---
 builtin/merge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/merge.c b/builtin/merge.c
index bdf6655..e15d0e1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -824,7 +824,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) {
-- 
1.9.0

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/7] merge: fix GIT_EDITOR override for commit hook

2014-03-15 Thread Benoit Pierre
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.pie...@gmail.com
---
 builtin/merge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/merge.c b/builtin/merge.c
index bdf6655..e15d0e1 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -824,7 +824,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) {
-- 
1.9.0

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/7] merge: fix GIT_EDITOR override for commit hook

2014-03-10 Thread Benoit Pierre
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.pie...@gmail.com
---
 builtin/merge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
1.9.0

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html