Repository navigation
test(git): cover the sparse-checkout false-positive class removed by #10537 - #10547
Merged
brennanb2025 merged 1 commit intoJul 25, 2026
Merged
Conversation
The old anchored regex matched neither branch on a `[section "sub"]key = value` line, so the parser never left `[core]` and credited the next indented line to it — reporting sparse for a worktree git says is not. Fails on the pre-fix parser (returns true where git reports unset).
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a regression test for 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Jul 27, 2026
7 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…stablyai#10547) The old anchored regex matched neither branch on a `[section "sub"]key = value` line, so the parser never left `[core]` and credited the next indented line to it — reporting sparse for a worktree git says is not. Fails on the pre-fix parser (returns true where git reports unset).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recovers a regression test written during the review of #10537 that was lost to a GitHub PR/ref desync: the branch ref advanced, but the PR object's
head.shastayed stale and nosynchronizeevent fired, so the squash merge used the older sha.The fix itself shipped in #10537. Only this test was missed. No source changes here.
What it covers
A
[section "sub"]key = valueline matched neither branch of the old anchored^\[...\]$regex, so the parser never left[core]and credited the next indented line to it — reporting sparse for a worktree git says is not.Verified against a real git binary:
git config --file <f> --get --type=bool core.sparseCheckoutreports unset. The pre-#10537 parser returnedtrue(bogus sparse badge); the shipped parser returnsundefined.This pins the opposite failure mode from the one #10537 set out to fix — loosening the header regex could have introduced false positives, and this proves it did not.
Verification
worktree-sparse-checkout.test.ts— 21/21 pass on mergedmain