]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t4202: move reffiles specific tests to t0600
authorJohn Cai <johncai86@gmail.com>
Fri, 19 Jan 2024 20:18:59 +0000 (20:18 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jan 2024 23:57:26 +0000 (15:57 -0800)
Move two tests into t0600 since they write loose reflog refs manually
and thus are specific to the reffiles backend.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0600-reffiles-backend.sh
t/t4202-log.sh

index 630b8ee11b3466a9a963e539d7813e36a77be769..e6a5f1868f917d01b791dbed2a5afce2b1965fca 100755 (executable)
@@ -364,4 +364,21 @@ test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '
        test_must_fail git rev-parse --verify broken
 '
 
+test_expect_success '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_grep broken stderr
+'
+
+test_expect_success 'log diagnoses bogus HEAD symref' '
+       git init empty &&
+       test-tool -C empty ref-store main create-symref HEAD refs/heads/invalid.lock &&
+       test_must_fail git -C empty log 2>stderr &&
+       test_grep broken stderr &&
+       test_must_fail git -C empty log --default totally-bogus 2>stderr &&
+       test_grep broken stderr
+'
+
 test_done
index ddd205f98abf7f8d58555761eaf20006bb8433e8..60fe60d7610e2a8141c58385b2319c7fa43a5de3 100755 (executable)
@@ -2255,23 +2255,6 @@ test_expect_success 'log on empty repo fails' '
        test_grep 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_grep broken stderr
-'
-
-test_expect_success REFFILES 'log diagnoses bogus HEAD symref' '
-       git init empty &&
-       test-tool -C empty ref-store main create-symref HEAD refs/heads/invalid.lock &&
-       test_must_fail git -C empty log 2>stderr &&
-       test_grep broken stderr &&
-       test_must_fail git -C empty log --default totally-bogus 2>stderr &&
-       test_grep broken stderr
-'
-
 test_expect_success 'log does not default to HEAD when rev input is given' '
        git log --branches=does-not-exist >actual &&
        test_must_be_empty actual