Test that wrong values are denied. Test that the value of log.diffMerges properly affects both --diff-merges=def and -m. Signed-off-by: Sergey Organov <sorganov@xxxxxxxxx> --- t/t4013-diff-various.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 275a6790896d..ee4afca06ced 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -460,6 +460,32 @@ test_expect_success 'log --diff-merges=def matches --diff-merges=separate' ' test_cmp expected actual ' +test_expect_success 'deny wrong log.diffMerges config' ' + git config log.diffMerges wrong-value && + test_expect_code 128 git log && + git config --unset log.diffMerges +' + +test_expect_success 'git config log.diffMerges first-parent' ' + git log -p --diff-merges=first-parent master >result && + process_diffs result >expected && + git config log.diffMerges first-parent && + git log -p --diff-merges=def master >result && + process_diffs result >actual && + git config --unset log.diffMerges && + test_cmp expected actual +' + +test_expect_success 'git config log.diffMerges first-parent vs -m' ' + git log -p --diff-merges=first-parent master >result && + process_diffs result >expected && + git config log.diffMerges first-parent && + git log -p -m master >result && + process_diffs result >actual && + git config --unset log.diffMerges && + test_cmp expected actual +' + test_expect_success 'log -S requires an argument' ' test_must_fail git log -S ' -- 2.25.1