t4202: mark bogus head hash test with REFFILES

In reftable, hashes are correctly formed by design. Split off test for git-log in empty repo. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Han-Wen Nienhuys committed May 31, 2021 at 16:56 UTC dc474899e7ad19be0a9f76b2ee2915b8bf79b683
1 file changed +9 -3
t/t4202-log.sh
+9 -3
@@ -1834,14 +1834,20 @@ test_expect_success 'log --graph --no-walk is forbidden' '
1834 test_must_fail git log --graph --no-walk
1835 '
1836
1837 -test_expect_success 'log diagnoses bogus HEAD hash' '
1837 +test_expect_success 'log on empty repo fails' '
1838 git init empty &&
1839 test_when_finished "rm -rf empty" &&
1840 test_must_fail git -C empty log 2>stderr &&
1841 - test_i18ngrep does.not.have.any.commits stderr &&
1841 + test_i18ngrep does.not.have.any.commits stderr
1842 +'
1843 +
1844 +test_expect_success REFFILES 'log diagnoses bogus HEAD hash' '
1845 + git init empty &&
1846 + test_when_finished "rm -rf empty" &&
1847 echo 1234abcd >empty/.git/refs/heads/main &&
1848 test_must_fail git -C empty log 2>stderr &&
1844 - test_i18ngrep broken stderr'
1849 + test_i18ngrep broken stderr
1850 +'
1851
1852 test_expect_success 'log diagnoses bogus HEAD symref' '
1853 git init empty &&