Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-11-02 11:46:49 +0300
committerJunio C Hamano <gitster@pobox.com>2023-11-03 02:37:06 +0300
commit239371168173da9a9556617fced1e053ac618a85 (patch)
treea1477b7e865be87a040c01be3cf5eaadfb699432 /t/t4013-diff-various.sh
parent1c6667cb9dab6f90dcc3381676b50b1f131aeda5 (diff)
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/t4013-diff-various.sh')
-rwxr-xr-xt/t4013-diff-various.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 4b47480831..fc8a0588ac 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -522,7 +522,7 @@ test_expect_success 'log -S requires an argument' '
'
test_expect_success 'diff --cached on unborn branch' '
- echo ref: refs/heads/unborn >.git/HEAD &&
+ git symbolic-ref HEAD refs/heads/unborn &&
git diff --cached >result &&
process_diffs result >actual &&
process_diffs "$TEST_DIRECTORY/t4013/diff.diff_--cached" >expected &&