From 400d160e39509fc5d7051f7338293b793cded9e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 12 Jan 2021 21:17:53 +0100 Subject: [PATCH] mailmap tests: add a test for "not a blob" error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add a test for one of the error conditions added in 938a60d64f (mailmap: clean up read_mailmap error handling, 2012-12-12). Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- t/t4203-mailmap.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 03a98d9635..78d56e0566 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -333,6 +333,15 @@ test_expect_success 'mailmap.blob can be missing' ' test_cmp expect actual ' +test_expect_success 'mailmap.blob might be the wrong type' ' + test_when_finished "rm .mailmap" && + cp default.map .mailmap && + + git -c mailmap.blob=HEAD: shortlog HEAD >actual 2>err && + test_i18ngrep "mailmap is not a blob" err && + test_cmp expect actual +' + test_expect_success 'mailmap.blob defaults to off in non-bare repo' ' git init non-bare && ( -- 2.52.0