Re: [PATCH v2 1/2] merge: Add merge.renames config setting
- From
Ben Peart <peartben@gmail.com>
- Date
- Apr 24, 2018, 20:31 UTC
- Message-ID
- <68fa18c0-1dac-f6dc-0c41-fa5722c2c227@gmail.com>
- In-Reply-To
- <CABPp-BFTywvVFV3Wx1jv9RyoFk_cE7XE8x1neuLVt4qwyw0EMw@mail.gmail.com>
On 4/24/2018 2:59 PM, Elijah Newren wrote:
Show 19 quoted lines
> Sorry, I noticed something else I missed on my last reading...
>
> On Tue, Apr 24, 2018 at 10:11 AM, Ben Peart <Ben.Peart@microsoft.com> wrote:
>> diff --git a/builtin/merge.c b/builtin/merge.c
>> index 8746c5e3e8..3be52cd316 100644
>> --- a/builtin/merge.c
>> +++ b/builtin/merge.c
>> @@ -424,6 +424,7 @@ static void finish(struct commit *head_commit,
>> opts.output_format |=
>> DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT;
>> opts.detect_rename = DIFF_DETECT_RENAME;
>> + git_config_get_bool("merge.renames", &opts.detect_rename);
>> diff_setup_done(&opts);
>> diff_tree_oid(head, new_head, "", &opts);
>> diffcore_std(&opts);
>
> Shouldn't this also be turned off if either (a) merge.renames is unset
> and diff.renames is false, or (b) the user specifies -Xno-renames?
> This makes me think that I should probably remove the line that overrides the detect_rename setting with the merge config setting. As I look at the code, none of the other merge options are reflected in the diffstat; instead, all the settings are pretty much hard coded. Perhaps I shouldn't rock that boat.