diff options
author | Orgad Shaneh <[email protected]> | 2018-10-10 09:54:47 +0300 |
---|---|---|
committer | Orgad Shaneh <[email protected]> | 2018-10-10 08:30:16 +0000 |
commit | 762fb5c353b9e0a5b8f7d30c19b855944d442f1d (patch) | |
tree | 6392653fc5056b0c116a93f948bc86f1f21b0941 /src/plugins/git/gitclient.h | |
parent | 86732dbdc02d1a1d0baf246af127b68fe1eb5750 (diff) |
Git: Make checkout asynchronous
It can be slow when many files are replaced.
Change-Id: I308698ef36973374f4526107fbda0d9ad907e707
Reviewed-by: Eike Ziller <[email protected]>
Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/git/gitclient.h')
-rw-r--r-- | src/plugins/git/gitclient.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index 30df75fb907..59b64ae2027 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -173,10 +173,9 @@ public: bool synchronousCheckoutFiles(const QString &workingDirectory, QStringList files = QStringList(), QString revision = QString(), QString *errorMessage = nullptr, bool revertStaging = true); - // Checkout ref - bool stashAndCheckout(const QString &workingDirectory, const QString &ref); - bool synchronousCheckout(const QString &workingDirectory, const QString &ref, - QString *errorMessage = nullptr); + enum class StashMode { NoStash, TryStash }; + void checkout(const QString &workingDirectory, const QString &ref, + StashMode stashMode = StashMode::TryStash); QStringList setupCheckoutArguments(const QString &workingDirectory, const QString &ref); void updateSubmodulesIfNeeded(const QString &workingDirectory, bool prompt); |