Repository navigation
fix(server): treat a missing git binary as no repository - #10376
realbakari wants to merge 1 commit into
Conversation
Folder open spawned git rev-parse and toasted VcsProcessSpawnError when git was not on PATH. Settings already showed Git as unavailable; detect did not use that result. Map the missing-executable spawn (ChildProcess NotFound, not chdir) to false/null, matching other CLI unavailable handling. Confirmed missing directories still fail. Fixes pingdotgg#10351 Grok 4.6 (Grok Build)
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This focused fix changes only repository detection so an unavailable Git executable is treated as no repository, while preserving errors for missing working directories and other operations. The production change is small and accompanied by targeted regression tests. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
|
Note This comment is posted by Julius' dot The missing-Git fix matches the direction approved in #10351, but the PR supplies no executed results for its new driver and registry regression tests. Added tests alone do not satisfy verification. Please run the focused GitVcsDriver and VcsDriverRegistry tests, report the commands and results for missing Git and missing working directories, then request reconsideration. |
What Changed
GitVcsDriver.isInsideWorkTreenow treats a missinggitexecutable as “not a repository” instead of failing.A
VcsProcessSpawnErrorwhose cause isPlatformErrorNotFoundonChildProcess.spawn(and notchdir) maps tofalse.detectRepositoryalready returnsnullwhen that probe is false, so folder-open VCS detect no longer toasts. A missing working directory still fails.Why
#10351: opening a folder without Git on PATH showed
VCS process failed to spawn… git. Exit 128 (“not a repo”) was already silent. A missing binary was not.Settings → Version Control already reports Git as unavailable via
git --version. That switch is an availability indicator, not an off switch, and detect did not use it. Same missing-binary handling asgh/az.Fixes #10351
UI Changes
None. The spawn toast on folder open goes away when Git is not installed. No copy or layout change.
Checklist
Grok 4.6 (Grok Build)