Thread (129 messages) 129 messages, 6 authors, 2021-06-02
STALE1855d REVIEWED: 1 (0M)

[PATCH v3 21/22] t4202: mark bogus head hash test with REFFILES

From: Han-Wen Nienhuys via GitGitGadget <hidden>
Date: 2021-05-31 17:40:53
Subsystem: the rest · Maintainer: Linus Torvalds

From: Han-Wen Nienhuys <redacted>

In reftable, hashes are correctly formed by design.

Split off test for git-log in empty repo.

Signed-off-by: Han-Wen Nienhuys <redacted>
Reviewed-by: Ævar Arnfjörð Bjarmason <redacted>
---
 t/t4202-log.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 327991fcea49..39e746fbcbe2 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1834,14 +1834,20 @@ test_expect_success 'log --graph --no-walk is forbidden' '
 	test_must_fail git log --graph --no-walk
 '
 
-test_expect_success 'log diagnoses bogus HEAD hash' '
+test_expect_success 'log on empty repo fails' '
 	git init empty &&
 	test_when_finished "rm -rf empty" &&
 	test_must_fail git -C empty log 2>stderr &&
-	test_i18ngrep does.not.have.any.commits stderr &&
+	test_i18ngrep does.not.have.any.commits stderr
+'
+
+test_expect_success REFFILES 'log diagnoses bogus HEAD hash' '
+	git init empty &&
+	test_when_finished "rm -rf empty" &&
 	echo 1234abcd >empty/.git/refs/heads/main &&
 	test_must_fail git -C empty log 2>stderr &&
-	test_i18ngrep broken stderr'
+	test_i18ngrep broken stderr
+'
 
 test_expect_success 'log diagnoses bogus HEAD symref' '
 	git init empty &&
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help