Skip to content

Commit 1030d14

Browse files
john-caigitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 99a294b commit 1030d14

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

t/t0600-reffiles-backend.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,4 +364,21 @@ test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '
364364
test_must_fail git rev-parse --verify broken
365365
'
366366

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+
367384
test_done

t/t4202-log.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,23 +2255,6 @@ test_expect_success 'log on empty repo fails' '
22552255
test_grep does.not.have.any.commits stderr
22562256
'
22572257

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-
22752258
test_expect_success 'log does not default to HEAD when rev input is given' '
22762259
git log --branches=does-not-exist >actual &&
22772260
test_must_be_empty actual

0 commit comments

Comments
 (0)