Git: Do not read working directory before it is set

This amends commit c17767c78e.

Change-Id: Ide6f9de2420dd1262b27aed83351b76404cdba30
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2020-06-07 09:22:00 +03:00
committed by Orgad Shaneh
parent e19f8899f5
commit bfcd1149eb
2 changed files with 16 additions and 9 deletions

View File

@@ -48,10 +48,9 @@ QT_END_NAMESPACE
namespace Core { class ICore; }
namespace VcsBase {
class VcsCommand;
class SubmitFileModel;
class VcsBaseDiffEditorController;
class VcsBaseEditorWidget;
class VcsCommand;
class SubmitFileModel;
class VcsBaseEditorWidget;
}
namespace DiffEditor {
@@ -63,6 +62,7 @@ namespace Git {
namespace Internal {
class CommitData;
class GitBaseDiffEditorController;
class GitSubmitEditorPanelData;
class Stash;
@@ -377,7 +377,7 @@ private:
QTextCodec *codecFor(CodecType codecType, const QString &source = QString()) const;
void requestReload(const QString &documentId, const QString &source, const QString &title, const QString &workingDirectory,
std::function<VcsBase::VcsBaseDiffEditorController *(Core::IDocument *)> factory) const;
std::function<GitBaseDiffEditorController *(Core::IDocument *)> factory) const;
// determine version as '(major << 16) + (minor << 8) + patch' or 0.
unsigned synchronousGitVersion(QString *errorMessage = nullptr) const;