From 4393c2374101fef9053643f9b4ec638b05bd0b26 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 10 Jul 2008 00:50:59 -0700 Subject: Teach merge.log to "git-merge" again The command forgot the configuration variable when rewritten in C. Signed-off-by: Junio C Hamano --- builtin-merge.c | 2 ++ t/t7600-merge.sh | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/builtin-merge.c b/builtin-merge.c index b2e702a11f..2ee1674690 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -464,6 +464,8 @@ int git_merge_config(const char *k, const char *v, void *cb) 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); } diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index d21cd290d3..72ef2e55d9 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -465,8 +465,15 @@ test_expect_success 'merge log message' ' git merge --no-log c2 && git show -s --pretty=format:%b HEAD >msg.act && verify_diff msg.nolog msg.act "[OOPS] bad merge log message" && + git merge --log c3 && git show -s --pretty=format:%b HEAD >msg.act && + verify_diff msg.log msg.act "[OOPS] bad merge log message" && + + git reset --hard HEAD^ && + git config merge.log yes && + git merge c3 && + git show -s --pretty=format:%b HEAD >msg.act && verify_diff msg.log msg.act "[OOPS] bad merge log message" ' -- cgit v1.2.3