diff options
author | Ben Peart <Ben.Peart@microsoft.com> | 2018-05-02 16:01:14 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-08 16:19:41 +0900 |
commit | 85b460305ce7ed399c83499851f46c4f870ce280 (patch) | |
tree | d56e1f9c1c1ab077050a6332365868e39ce5a485 /t | |
parent | a7152e9d226652e6ceaa64f099fc628aa2a909bd (diff) | |
download | git-85b460305ce7ed399c83499851f46c4f870ce280.tar.gz |
merge: add merge.renames config setting
Add the ability to control rename detection for merge via a config setting.
This setting behaves the same and defaults to the value of diff.renames but only
applies to merge.
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Ben Peart <benpeart@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3034-merge-recursive-rename-options.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t3034-merge-recursive-rename-options.sh index b9c4028496..3d9fae68c4 100755 --- a/t/t3034-merge-recursive-rename-options.sh +++ b/t/t3034-merge-recursive-rename-options.sh @@ -309,4 +309,22 @@ test_expect_success 'last wins in --find-renames=<m> --rename-threshold=<n>' ' check_threshold_0 ' +test_expect_success 'merge.renames disables rename detection' ' + git read-tree --reset -u HEAD && + git -c merge.renames=false merge-recursive $tail && + check_no_renames +' + +test_expect_success 'merge.renames defaults to diff.renames' ' + git read-tree --reset -u HEAD && + git -c diff.renames=false merge-recursive $tail && + check_no_renames +' + +test_expect_success 'merge.renames overrides diff.renames' ' + git read-tree --reset -u HEAD && + test_must_fail git -c diff.renames=false -c merge.renames=true merge-recursive $tail && + $check_50 +' + test_done |