summaryrefslogtreecommitdiff
path: root/t/t4202-log.sh
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-05-31 16:56:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-06-02 01:01:55 (GMT)
commitdc474899e7ad19be0a9f76b2ee2915b8bf79b683 (patch)
tree267d567333e5ec19e06b7ccf408083639a3a5d24 /t/t4202-log.sh
parentc139e582376bb548949753153fce809fc279e17a (diff)
downloadgit-dc474899e7ad19be0a9f76b2ee2915b8bf79b683.zip
git-dc474899e7ad19be0a9f76b2ee2915b8bf79b683.tar.gz
git-dc474899e7ad19be0a9f76b2ee2915b8bf79b683.tar.bz2
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>
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 327991f..39e746f 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 &&