diff options
| author | Andre Hartmann <[email protected]> | 2025-06-10 21:46:59 +0200 |
|---|---|---|
| committer | André Hartmann <[email protected]> | 2025-06-12 06:46:24 +0000 |
| commit | 4baa45cb0df6e784f663fe7a553de6ffbbea6485 (patch) | |
| tree | 72f569620182bb92c1adfef41393d535dc7d4444 /src/plugins/git/gitclient.cpp | |
| parent | 29e29e6c3b4f16a286adbaa5167f9e39a835317d (diff) | |
Git: Avoid creating unnecessary lock files
Starting with Git 2.15 (which is newer than our current
requirement 2.13), git status can be used without modifying
the index and therefore requiring locks.
And by using the environment variable `GIT_OPTIONAL_LOCKS`
we are still compatible to 2.13, while most users with
newer git version can already benefit from the feature.
Task-number: QTCREATORBUG-31952
Change-Id: Id86f564b20fb55f42b3492144df3593503c1a313
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
| -rw-r--r-- | src/plugins/git/gitclient.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index fa2abff82d3..7911fe60877 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2221,6 +2221,7 @@ Environment GitClient::processEnvironment(const FilePath &appliedTo) const environment.set("HOME", homePath); } environment.set("GIT_EDITOR", m_disableEditor ? "true" : m_gitQtcEditor); + environment.set("GIT_OPTIONAL_LOCKS", "0"); return environment.appliedToEnvironment(appliedTo.deviceEnvironment()); } |
