From 7260c37aa8c91c8008dcd2442a19c23d1c9040fb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 20 May 2024 07:14:39 +0200 Subject: Merging upstream version 1:2.45.1. Signed-off-by: Daniel Baumann --- t/t6301-for-each-ref-errors.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 't/t6301-for-each-ref-errors.sh') diff --git a/t/t6301-for-each-ref-errors.sh b/t/t6301-for-each-ref-errors.sh index 2667dd1..83b8a19 100755 --- a/t/t6301-for-each-ref-errors.sh +++ b/t/t6301-for-each-ref-errors.sh @@ -15,7 +15,7 @@ test_expect_success setup ' git for-each-ref --format="%(objectname) %(refname)" >brief-list ' -test_expect_success 'Broken refs are reported correctly' ' +test_expect_success REFFILES 'Broken refs are reported correctly' ' r=refs/heads/bogus && : >.git/$r && test_when_finished "rm -f .git/$r" && @@ -25,7 +25,7 @@ test_expect_success 'Broken refs are reported correctly' ' test_cmp broken-err err ' -test_expect_success 'NULL_SHA1 refs are reported correctly' ' +test_expect_success REFFILES 'NULL_SHA1 refs are reported correctly' ' r=refs/heads/zeros && echo $ZEROS >.git/$r && test_when_finished "rm -f .git/$r" && @@ -39,15 +39,14 @@ test_expect_success 'NULL_SHA1 refs are reported correctly' ' ' test_expect_success 'Missing objects are reported correctly' ' - r=refs/heads/missing && - echo $MISSING >.git/$r && - test_when_finished "rm -f .git/$r" && - echo "fatal: missing object $MISSING for $r" >missing-err && + test_when_finished "git update-ref -d refs/heads/missing" && + test-tool ref-store main update-ref msg refs/heads/missing "$MISSING" "$ZERO_OID" REF_SKIP_OID_VERIFICATION && + echo "fatal: missing object $MISSING for refs/heads/missing" >missing-err && test_must_fail git for-each-ref 2>err && test_cmp missing-err err && ( cat brief-list && - echo "$MISSING $r" + echo "$MISSING refs/heads/missing" ) | sort -k 2 >missing-brief-expected && git for-each-ref --format="%(objectname) %(refname)" >brief-out 2>brief-err && test_cmp missing-brief-expected brief-out && -- cgit v1.2.3