From cdb73ca56f21835b93345442a96c97f6a0589ef7 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 20 May 2020 17:36:08 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- t/t1506-rev-parse-diagnosis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t1506-rev-parse-diagnosis.sh') diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh index 52edcbdcc3..dbf690b9c1 100755 --- a/t/t1506-rev-parse-diagnosis.sh +++ b/t/t1506-rev-parse-diagnosis.sh @@ -207,7 +207,7 @@ test_expect_success 'arg before dashdash must be a revision (ambiguous)' ' { # we do not want to use rev-parse here, because # we are testing it - cat .git/refs/heads/foobar && + git show-ref -s refs/heads/foobar && printf "%s\n" -- } >expect && git rev-parse foobar -- >actual && -- cgit v1.2.3