Open kaste opened 2 years ago
Timings using C:\Dev\Git\cmd\git.exe
(D) [ 41ms] $ git status --porcelain -z -b
(D) [ 45ms] $ git status --porcelain -z -b
(D) [ 43ms] $ git status --porcelain -z -b
(D) [ 43ms] $ git status --porcelain -z -b
(D) [ 42ms] $ git status --porcelain -z -b
and using C:/Dev/Git/mingw64/libexec/git-core
:
(D) [ 33ms] $ git status --porcelain -z -b
(D) [ 35ms] $ git status --porcelain -z -b
(D) [ 36ms] $ git status --porcelain -z -b
(D) [ 35ms] $ git status --porcelain -z -b
(D) [ 27ms] $ git status --porcelain -z -b
(D) [ 31ms] $ git status --porcelain -z -b
(D) [ 36ms] $ git status --porcelain -z -b
it is quiOn Windows,
where git
typically returns a wrapper executable, e.g.C:\Dev\Git\cmd\git.exe
. This wrapper is slower than using the real executable, for example located atThe complete absolute path to the binary is then
"git_path": "C:\\Dev\\Git\\mingw64\\libexec\\git-core\\git.exe"
Initial conversation: https://github.com/magit/magit/pull/1289 The current code in magit is quite complex. I think we can just use
git --exec-path
.On my system modifying PATH is also not necessary.