diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-12-20 10:14:53 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-12-20 10:14:53 -0800 |
| commit | a21a9296439cbbf548b87d820cd9de9ff81fea22 (patch) | |
| tree | 71b6dd59fcb8ab630f03b586a46e940b8f28b769 /t/t6301-for-each-ref-errors.sh | |
| parent | Merge branch 'jp/use-diff-index-in-pre-commit-sample' (diff) | |
| parent | t6301: write invalid object ID via `test-tool ref-store` (diff) | |
| download | git-a21a9296439cbbf548b87d820cd9de9ff81fea22.tar.gz git-a21a9296439cbbf548b87d820cd9de9ff81fea22.zip | |
Merge branch 'ps/ref-tests-update-more'
Tests update.
* ps/ref-tests-update-more:
t6301: write invalid object ID via `test-tool ref-store`
t5551: stop writing packed-refs directly
t5401: speed up creation of many branches
t4013: simplify magic parsing and drop "failure"
t3310: stop checking for reference existence via `test -f`
t1417: make `reflog --updateref` tests backend agnostic
t1410: use test-tool to create empty reflog
t1401: stop treating FETCH_HEAD as real reference
t1400: split up generic reflog tests from the reffile-specific ones
t0410: mark tests to require the reffiles backend
Diffstat (limited to 't/t6301-for-each-ref-errors.sh')
| -rwxr-xr-x | t/t6301-for-each-ref-errors.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/t/t6301-for-each-ref-errors.sh b/t/t6301-for-each-ref-errors.sh index 2667dd13fe..83b8a19d94 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 && |
