Skip to content

Commit dc47489

Browse files
hanwengitster
authored andcommitted
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 <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c139e58 commit dc47489

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

t/t4202-log.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,14 +1834,20 @@ test_expect_success 'log --graph --no-walk is forbidden' '
18341834
test_must_fail git log --graph --no-walk
18351835
'
18361836

1837-
test_expect_success 'log diagnoses bogus HEAD hash' '
1837+
test_expect_success 'log on empty repo fails' '
18381838
git init empty &&
18391839
test_when_finished "rm -rf empty" &&
18401840
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" &&
18421847
echo 1234abcd >empty/.git/refs/heads/main &&
18431848
test_must_fail git -C empty log 2>stderr &&
1844-
test_i18ngrep broken stderr'
1849+
test_i18ngrep broken stderr
1850+
'
18451851

18461852
test_expect_success 'log diagnoses bogus HEAD symref' '
18471853
git init empty &&

0 commit comments

Comments
 (0)