summaryrefslogtreecommitdiff
path: root/t/t1401-symbolic-ref.sh
diff options
context:
space:
mode:
authorLibravatar David Turner <dturner@twopensource.com>2018-05-23 07:25:17 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-23 14:59:38 +0900
commitcbc5cf7ce5112a5c704ce4116b8414c8385d23ca (patch)
tree01ecfdcf4ae14e2a26e6c20f5de5621957447abe /t/t1401-symbolic-ref.sh
parentGit 2.17 (diff)
downloadtgif-cbc5cf7ce5112a5c704ce4116b8414c8385d23ca.tar.xz
t: make many tests depend less on the refs being files
Many tests are very focused on the file system representation of the loose and packed refs code. As there are plans to implement other ref storage systems, let's migrate these tests to a form that test the intent of the refs storage system instead of it internals. This will make clear to readers that these tests do not depend on which ref backend is used. The internals of the loose refs backend are still tested in t1400-update-ref.sh, whereas the tests changed in this patch focus on testing other aspects. This patch just takes care of many low hanging fruits. It does not try to completely solves the issue. Helped-by: Stefan Beller <sbeller@google.com> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1401-symbolic-ref.sh')
-rwxr-xr-xt/t1401-symbolic-ref.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh
index 9e782a8122..a4ebb0b65f 100755
--- a/t/t1401-symbolic-ref.sh
+++ b/t/t1401-symbolic-ref.sh
@@ -65,7 +65,7 @@ reset_to_sane
test_expect_success 'symbolic-ref fails to delete real ref' '
echo "fatal: Cannot delete refs/heads/foo, not a symbolic ref" >expect &&
test_must_fail git symbolic-ref -d refs/heads/foo >actual 2>&1 &&
- test_path_is_file .git/refs/heads/foo &&
+ git rev-parse --verify refs/heads/foo &&
test_cmp expect actual
'
reset_to_sane