diff options
author | Patrick Steinhardt <ps@pks.im> | 2023-11-02 09:46:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-03 00:37:06 +0100 |
commit | 239371168173da9a9556617fced1e053ac618a85 (patch) | |
tree | a1477b7e865be87a040c01be3cf5eaadfb699432 /t/t5605-clone-local.sh | |
parent | t: convert tests to not write references via the filesystem (diff) | |
download | git-239371168173da9a9556617fced1e053ac618a85.tar.xz git-239371168173da9a9556617fced1e053ac618a85.zip |
t: convert tests to not access symrefs via the filesystem
Some of our tests access symbolic references via the filesystem
directly. While this works with the current files reference backend, it
this will break once we have a second reference backend in our codebase.
Refactor these tests to instead use git-symbolic-ref(1) or our
`ref-store` test tool. The latter is required in some cases where safety
checks of git-symbolic-ref(1) would otherwise reject writing a symbolic
reference.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5605-clone-local.sh')
-rwxr-xr-x | t/t5605-clone-local.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh index 946c575188..bedd29d055 100755 --- a/t/t5605-clone-local.sh +++ b/t/t5605-clone-local.sh @@ -65,7 +65,7 @@ test_expect_success 'Even without -l, local will make a hardlink' ' ' test_expect_success 'local clone of repo with nonexistent ref in HEAD' ' - echo "ref: refs/heads/nonexistent" > a.git/HEAD && + git -C a.git symbolic-ref HEAD refs/heads/nonexistent && git clone a d && (cd d && git fetch && |