Skip to content

Commit 759d02d

Browse files
hanwengitster
authored andcommitted
t1407: require REFFILES for for_each_reflog test
Add extensive comment why this test needs a REFFILES annotation. I tried forcing universal reflog creation with core.logAllRefUpdates=true, but that apparently also doesn't cause reflogs to be created for pseudorefs Signed-off-by: Han-Wen Nienhuys <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c305e66 commit 759d02d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/t1407-worktree-ref-store.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ test_expect_success 'create_symref(FOO, refs/heads/main)' '
5252
test_cmp expected actual
5353
'
5454

55-
test_expect_success 'for_each_reflog()' '
55+
# Some refs (refs/bisect/*, pseudorefs) are kept per worktree, so they should
56+
# only appear in the for-each-reflog output if it is called from the correct
57+
# worktree, which is exercised in this test. This test is poorly written (and
58+
# therefore marked REFFILES) for mulitple reasons: 1) it creates invalidly
59+
# formatted log entres. 2) it uses direct FS access for creating the reflogs. 3)
60+
# PSEUDO-WT and refs/bisect/random do not create reflogs by default, so it is
61+
# not testing a realistic scenario.
62+
test_expect_success REFFILES 'for_each_reflog()' '
5663
echo $ZERO_OID > .git/logs/PSEUDO-MAIN &&
5764
mkdir -p .git/logs/refs/bisect &&
5865
echo $ZERO_OID > .git/logs/refs/bisect/random &&

0 commit comments

Comments
 (0)