Commit 7e4939e
committed
perf(opencode): make vcs init non-blocking by forking branch resolution
Vcs.init now forks the InstanceState resolution into the layer scope
instead of awaiting it, so startup no longer blocks on git branch
introspection (rev-parse, branch lookups). The state still resolves
lazily on first read.
Cherry-picked from anomalyco/opencode 3f7df08 (anomalyco#22771); adapted to
fork's effect import style (ServiceMap rather than Context).
Verified: typecheck clean, vcs.test.ts 10/10 pass.
Note: companion snapshot perf patch (a992d8b) was evaluated but
skipped — fork's snapshot/index.ts uses a different staging path
(git add --sparse .) and never invokes check-ignore on the candidate
list, so the ENAMETOOLONG bug and the stdin-pathspec speedup do not
apply.1 parent 441188c commit 7e4939e
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
251 | | - | |
| 252 | + | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
| |||
0 commit comments