summaryrefslogtreecommitdiff
path: root/t/t1407-worktree-ref-store.sh
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-05-31 16:56:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-06-02 01:01:55 (GMT)
commit759d02d1aeb2e9d51afe9f948fe0dc15093722a0 (patch)
treed89c0bcf70804a9805858838a5355a101af1a310 /t/t1407-worktree-ref-store.sh
parentc305e667e0cad4acb40a4d408e44b823fa47c111 (diff)
downloadgit-759d02d1aeb2e9d51afe9f948fe0dc15093722a0.zip
git-759d02d1aeb2e9d51afe9f948fe0dc15093722a0.tar.gz
git-759d02d1aeb2e9d51afe9f948fe0dc15093722a0.tar.bz2
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 <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/t1407-worktree-ref-store.sh')
-rwxr-xr-xt/t1407-worktree-ref-store.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh
index d3fe777..ad8006c 100755
--- a/t/t1407-worktree-ref-store.sh
+++ b/t/t1407-worktree-ref-store.sh
@@ -52,7 +52,14 @@ test_expect_success 'create_symref(FOO, refs/heads/main)' '
test_cmp expected actual
'
-test_expect_success 'for_each_reflog()' '
+# Some refs (refs/bisect/*, pseudorefs) are kept per worktree, so they should
+# only appear in the for-each-reflog output if it is called from the correct
+# worktree, which is exercised in this test. This test is poorly written (and
+# therefore marked REFFILES) for mulitple reasons: 1) it creates invalidly
+# formatted log entres. 2) it uses direct FS access for creating the reflogs. 3)
+# PSEUDO-WT and refs/bisect/random do not create reflogs by default, so it is
+# not testing a realistic scenario.
+test_expect_success REFFILES 'for_each_reflog()' '
echo $ZERO_OID > .git/logs/PSEUDO-MAIN &&
mkdir -p .git/logs/refs/bisect &&
echo $ZERO_OID > .git/logs/refs/bisect/random &&