Skip to content

Revert sparse checkout worktree creation - #1290

Merged
Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/revert-sparse-checkout-1131
Apr 30, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/revert-sparse-checkout-1131

Conversation

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Summary

Why

The most suspicious code path from #1131 is listWorktrees() adding git sparse-checkout list probes for every non-bare worktree during normal worktree refreshes, multiplying Git subprocesses on startup/refresh.

Verification

  • Ran pnpm install
  • Ran pnpm run build:mac successfully locally
  • Tested dist/orca-macos-arm64.dmg locally; app was not laggy

Note: local build used Node v25.9.0 while repo wants Node 24, and local signing used ad-hoc/no Developer ID signing.

@Jinwoo-H
Jinwoo-H merged commit 000d4dc into main Apr 30, 2026
3 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/revert-sparse-checkout-1131 branch April 30, 2026 22:47
mralexsaavedra pushed a commit to mralexsaavedra/orca that referenced this pull request May 2, 2026
artile added a commit to tao-io/orca that referenced this pull request Jul 22, 2026
`git sparse-checkout disable` restores the full working tree and sets
core.sparseCheckout=false, but deliberately leaves <gitdir>/info/sparse-checkout
in place so the checkout can be re-enabled with the same patterns.
detectSparseCheckout treated the mere presence of that pattern file as "sparse",
so a fully-populated worktree kept showing the sparse badge and the misleading
"Partial checkout. Files outside these paths are not on disk." tooltip.

Gate the fast-path fs.stat behind a config read that confirms core.sparseCheckout
is actually enabled (shared repo config or per-worktree config.worktree, honoring
git's precedence). The config read runs only when a non-empty pattern file
exists, so it does not reintroduce the per-poll subprocess fan-out PR stablyai#1290
removed, and it reads git's config files directly (no subprocess).

Adds a real-git regression test (enable -> disable leaves file -> not sparse) and
unit tests for the git-config boolean parser.
nwparker pushed a commit that referenced this pull request Jul 24, 2026
`git sparse-checkout disable` restores the full working tree and sets
core.sparseCheckout=false, but deliberately leaves <gitdir>/info/sparse-checkout
in place so the checkout can be re-enabled with the same patterns.
detectSparseCheckout treated the mere presence of that pattern file as "sparse",
so a fully-populated worktree kept showing the sparse badge and the misleading
"Partial checkout. Files outside these paths are not on disk." tooltip.

Gate the fast-path fs.stat behind a config read that confirms core.sparseCheckout
is actually enabled (shared repo config or per-worktree config.worktree, honoring
git's precedence). The config read runs only when a non-empty pattern file
exists, so it does not reintroduce the per-poll subprocess fan-out PR #1290
removed, and it reads git's config files directly (no subprocess).

Adds a real-git regression test (enable -> disable leaves file -> not sparse) and
unit tests for the git-config boolean parser.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…yai#9922)

`git sparse-checkout disable` restores the full working tree and sets
core.sparseCheckout=false, but deliberately leaves <gitdir>/info/sparse-checkout
in place so the checkout can be re-enabled with the same patterns.
detectSparseCheckout treated the mere presence of that pattern file as "sparse",
so a fully-populated worktree kept showing the sparse badge and the misleading
"Partial checkout. Files outside these paths are not on disk." tooltip.

Gate the fast-path fs.stat behind a config read that confirms core.sparseCheckout
is actually enabled (shared repo config or per-worktree config.worktree, honoring
git's precedence). The config read runs only when a non-empty pattern file
exists, so it does not reintroduce the per-poll subprocess fan-out PR stablyai#1290
removed, and it reads git's config files directly (no subprocess).

Adds a real-git regression test (enable -> disable leaves file -> not sparse) and
unit tests for the git-config boolean parser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant