# [PATCH] Teach merge.log to "git-merge" again

3 messages from 2008-07-10 to 2008-07-14. Participants: Junio C Hamano, Miklos Vajna.
Thread: https://gitlist.dev/t/14390

## Junio C Hamano, 2008-07-10 07:50

Subject: [PATCH] Teach merge.log to "git-merge" again
Message-ID: <7v7ibuqisc.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7ibuqisc.fsf%40gitster.siamese.dyndns.org

```
The command forgot the configuration variable when rewritten in C.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin-merge.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/builtin-merge.c b/builtin-merge.c
index 821edcd..bc3f921 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -519,8 +519,10 @@ int git_merge_config(const char *k, const char *v, void *cb)
 	else if (!strcmp(k, "pull.twohead"))
 		return git_config_string(&pull_twohead, k, v);
 	else if (!strcmp(k, "pull.octopus"))
 		return git_config_string(&pull_octopus, k, v);
+	else if (!strcmp(k, "merge.log") || !strcmp(k, "merge.summary"))
+		option_log = git_config_bool(k, v);
 	return git_diff_ui_config(k, v, cb);
 }
 
 static int read_tree_trivial(unsigned char *common, unsigned char *head,

```

## Miklos Vajna, 2008-07-10 08:32

Subject: [PATCH] Add testcase for merge.log
Message-ID: <1215678742-14042-1-git-send-email-vmiklos@frugalware.org>
URL: https://gitlist.dev/e/1215678742-14042-1-git-send-email-vmiklos%40frugalware.org
In-Reply-To: <7v7ibuqisc.fsf@gitster.siamese.dyndns.org>

```
Make sure that the merge.log boolean config setting is the same as --log
and --no-log.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

On Thu, Jul 10, 2008 at 12:50:59AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> The command forgot the configuration variable when rewritten in C.

Thanks. Here is a testcase.

 t/t7600-merge.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index dfddd86..a3c17a9 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -456,6 +456,17 @@ test_expect_success 'merge log message' '
 	verify_diff msg.log msg.act "[OOPS] bad merge log message"
 '
 
+test_expect_success 'merge log message (from config)' '
+	git reset --hard c0 &&
+	git merge c2 &&
+	git show -s --pretty=format:%b HEAD >msg.act &&
+	verify_diff msg.nolog msg.act "[OOPS] bad merge log message" &&
+	git config merge.log true &&
+	git merge c3 &&
+	git show -s --pretty=format:%b HEAD >msg.act &&
+	verify_diff msg.log msg.act "[OOPS] bad merge log message"
+'
+
 test_debug 'gitk --all'
 
 test_done
-- 
1.5.6.2.450.g8d367.dirty

```

## Miklos Vajna, 2008-07-14 12:06

Subject: Re: [PATCH] Add testcase for merge.log
Message-ID: <20080714120630.GN10347@genesis.frugalware.org>
URL: https://gitlist.dev/e/20080714120630.GN10347%40genesis.frugalware.org
In-Reply-To: <1215678742-14042-1-git-send-email-vmiklos@frugalware.org>

```
On Thu, Jul 10, 2008 at 10:32:22AM +0200, Miklos Vajna <vmiklos@frugalware.org> wrote:
> On Thu, Jul 10, 2008 at 12:50:59AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> > The command forgot the configuration variable when rewritten in C.
> 
> Thanks. Here is a testcase.

As far as I see this has been forgotten. Should I resend it on top of
current mv/merge-in-c?

Thanks.

```
