Skip to content

Commit

Permalink
Teach merge.log to "git-merge" again
Browse files Browse the repository at this point in the history
The command forgot the configuration variable when rewritten in C.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jul 10, 2008
1 parent 1c7b76b commit 4393c23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
7 changes: 7 additions & 0 deletions t/t7600-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
'

Expand Down

0 comments on commit 4393c23

Please sign in to comment.