Repository navigation
Conversation
PATH's git on Windows is Git for Windows' cmd\git.exe or bin\git.exe, a launcher that starts mingw64\bin\git.exe as a second process on every call: about 10 ms of each 25-40 ms call on a GitHub runner and on a developer machine. gitx now runs the git in the directory "git --exec-path" names, where every git install puts one, and falls back to PATH's git when that directory holds none. git.exe sets up the same environment for what it starts as the launcher does.
|
Reviewer notes
|
|
Closing in favor of #23. The pre-merge review found a real behavior change here, and I reproduced it. Git for Windows' #23 gets the CI benefit without touching the product: the Windows test leg puts |
What
cmd\git.exein a developer's shell,bin\git.exeon GitHub runners), which startsmingw64\bin\git.exeas a second process on every call: about 10 ms of each 25-40 ms call.git --exec-pathnames, where every git install puts one. It is resolved once per PATH through perf(gitx): search PATH for git once per PATH, not on every call #18's cache, and gitx falls back to PATH's git when that directory holds none.DECISIONS.md.Verification
go build ./...,go vet ./...andgofmt -l .are clean. The fullgo test -count=1 ./...passes locally on Windows with theclaudeCLI off PATH, run with the rest of the series stacked.New
TestRunRunsGitsOwnBinaryfails when gitx keeps PATH's git. NewTestRunFallsBackToTheGitPATHFindsputs a fake git on PATH whose exec path holds no git, and fails when the fallback is removed. Both were mutation-checked.Same environment either way:
--exec-path,--html-path,config --system --list --show-origin, and an alias printing MSYSTEM, HOME and thesh/sshit resolves print the same throughcmd\git.exe,mingw64\bin\git.exeandlibexec\git-core\git.exe, even with every Git directory taken off PATH.On GitHub windows-2025 runners, traced and paired: verifydeliver's publish tests, two runners, three rounds each, variant order rotated:
rev-parse,ls-files,diff,symbolic-ref)perf(gitx): search PATH for git once per PATH, not on every call #18 alone was within noise on those runners, so the difference is this PR.
On a Windows 11 machine:
git --versiontakes 37.8 ms throughcmd\git.exeand 26.2 ms direct;git rev-parse HEADtakes 43.8 ms and 32.3 ms.🤖 Generated with Claude Code