t4202: move reffiles specific tests to t0600
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>
John Cai committed
Jan 19, 2024 at 20:18 UTC
1030d1407f92996034afc0f45317e87b90ea65c7
2 files changed
+17
-17
t/t0600-reffiles-backend.sh
+17
@@ -364,4 +364,21 @@ test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '
364
test_must_fail git rev-parse --verify broken
365
'
366
367
+test_expect_success 'log diagnoses bogus HEAD hash' '
368
+ git init empty &&
369
+ test_when_finished "rm -rf empty" &&
370
+ echo 1234abcd >empty/.git/refs/heads/main &&
371
+ test_must_fail git -C empty log 2>stderr &&
372
+ test_grep broken stderr
373
+'
374
+
375
+test_expect_success 'log diagnoses bogus HEAD symref' '
376
+ git init empty &&
377
+ test-tool -C empty ref-store main create-symref HEAD refs/heads/invalid.lock &&
378
+ test_must_fail git -C empty log 2>stderr &&
379
+ test_grep broken stderr &&
380
+ test_must_fail git -C empty log --default totally-bogus 2>stderr &&
381
+ test_grep broken stderr
382
+'
383
+
384
test_done
t/t4202-log.sh
-17
@@ -2255,23 +2255,6 @@ test_expect_success 'log on empty repo fails' '
2255
test_grep does.not.have.any.commits stderr
2256
'
2257
2258
-test_expect_success REFFILES 'log diagnoses bogus HEAD hash' '
2259
- git init empty &&
2260
- test_when_finished "rm -rf empty" &&
2261
- echo 1234abcd >empty/.git/refs/heads/main &&
2262
- test_must_fail git -C empty log 2>stderr &&
2263
- test_grep broken stderr
2264
-'
2265
-
2266
-test_expect_success REFFILES 'log diagnoses bogus HEAD symref' '
2267
- git init empty &&
2268
- test-tool -C empty ref-store main create-symref HEAD refs/heads/invalid.lock &&
2269
- test_must_fail git -C empty log 2>stderr &&
2270
- test_grep broken stderr &&
2271
- test_must_fail git -C empty log --default totally-bogus 2>stderr &&
2272
- test_grep broken stderr
2273
-'
2274
-
2258
test_expect_success 'log does not default to HEAD when rev input is given' '
2259
git log --branches=does-not-exist >actual &&
2260
test_must_be_empty actual