t: use update-ref and show-ref to reading/writing refs

Reading and writing .git/refs/* assumes that refs are stored in the 'files'
ref backend.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Han-Wen Nienhuys
2020-05-20 17:36:08 +00:00
committed by Junio C Hamano
parent d1eb22da09
commit cdb73ca56f
5 changed files with 21 additions and 21 deletions

View File

@ -135,7 +135,7 @@ test_expect_success 'tag replaced commit' '
test_expect_success '"git fsck" works' '
git fsck master >fsck_master.out &&
test_i18ngrep "dangling commit $R" fsck_master.out &&
test_i18ngrep "dangling tag $(cat .git/refs/tags/mytag)" fsck_master.out &&
test_i18ngrep "dangling tag $(git show-ref -s refs/tags/mytag)" fsck_master.out &&
test -z "$(git fsck)"
'