]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1450-fsck.sh
t: convert tests to not access symrefs via the filesystem
[thirdparty/git.git] / t / t1450-fsck.sh
index f55b539b08389348ac945ba09bb4e3d9a9763337..a3c97b9c7fc7a385f7552ba063fe95e3ff92bc36 100755 (executable)
@@ -133,7 +133,7 @@ test_expect_success 'HEAD link pointing at a funny object' '
 
 test_expect_success 'HEAD link pointing at a funny place' '
        test_when_finished "git update-ref --no-deref HEAD $orig_head" &&
-       echo "ref: refs/funny/place" >.git/HEAD &&
+       test-tool ref-store main create-symref HEAD refs/funny/place &&
        # avoid corrupt/broken HEAD from interfering with repo discovery
        test_must_fail env GIT_DIR=.git git fsck 2>out &&
        test_i18ngrep "HEAD points to something strange" out
@@ -169,7 +169,7 @@ test_expect_success 'other worktree HEAD link pointing at missing object' '
 test_expect_success 'other worktree HEAD link pointing at a funny place' '
        test_when_finished "rm -rf .git/worktrees other" &&
        git worktree add other &&
-       echo "ref: refs/funny/place" >.git/worktrees/other/HEAD &&
+       git -C other symbolic-ref HEAD refs/funny/place &&
        test_must_fail git fsck 2>out &&
        test_i18ngrep "worktrees/other/HEAD points to something strange" out
 '