threads / patch / 14390

patchTeach merge.log to "git-merge" again

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

## tl;dr

3 messages between Jul 10, 2008 and Jul 14, 2008. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Junio C Hamano· Jul 10, 2008, 07:50 UTC · lore
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(-)
Show changes to builtin-merge.c +2 −0
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· Jul 10, 2008, 08:32 UTC · re: Junio C Hamano · lore

[PATCH] Add testcase for merge.log

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(-)
Show changes to t/t7600-merge.sh +11 −0
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· Jul 14, 2008, 12:06 UTC · re: Miklos Vajna · lore

Re: [PATCH] Add testcase for merge.log

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.

← back to recent threads