Git: Reduce PATH searches for executable

This reduces executions in BranchModel::updateUpstreamStatus (which is
called for each local branch with a tracking branch) from 3s to ~700ms
on Windows.

Change-Id: I92651ba8f37987bef49a80b46963964ae8cacb3c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Orgad Shaneh
2023-02-13 19:17:38 +02:00
committed by Orgad Shaneh
parent 728e73ea9d
commit c2cfe596b9
2 changed files with 14 additions and 5 deletions

View File

@@ -40,6 +40,9 @@ public:
Utils::BoolAspect refLogShowDate;
Utils::BoolAspect instantBlame;
mutable Utils::FilePath resolvedBinPath;
mutable bool tryResolve = true;
Utils::FilePath gitExecutable(bool *ok = nullptr, QString *errorMessage = nullptr) const;
};