]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mailmap tests: add a test for "not a blob" error
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 12 Jan 2021 20:17:53 +0000 (21:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2021 22:04:40 +0000 (14:04 -0800)
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4203-mailmap.sh

index 03a98d9635a35868a54397eff71c49933672ed0a..78d56e0566637c3fba9f070389bd922e2632118a 100755 (executable)
@@ -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 &&
        (