diff --git a/git/git_client.h b/git/git_client.h index cdfe2e7..9781bce 100644 --- a/git/git_client.h +++ b/git/git_client.h @@ -17,19 +17,28 @@ class GitClient : public QObject { QString const m_branchName; QString const m_customerRepository; - std::optional gitCloneRepository(QString const &repPath); - bool gitCheckout(QString const &branchName); + bool copyGitConfigFromMaster(); public: - explicit GitClient(QString const &workingDirectory = QCoreApplication::applicationDirPath(), - QString const &branchName = "master"); + explicit GitClient(QString const &repositoryPath, + QString const &customerId, + QString const &workingDirectory = QCoreApplication::applicationDirPath(), + QString const &branchName = "master", + QObject *parent = 0); - void setWorkingDirectory(QString const &workingDirectory); - QString workingDirectory() const; - void setBranchName(QString const &branchName); - QString branchName() const; + bool gitCloneCustomerRepository(); + bool gitCheckoutBranch(); - std::optional gitCloneBranch(QString const &repPath, QString const &branchName); + QString const workingDirectory() const { return m_workingDirectory; } + QString workingDirectory() { return m_workingDirectory; } + + QString const branchName() const { return m_branchName; } + QString branchName() { return m_branchName; } + + QString repositoryPath() { return m_repositoryPath; } + QString const repositoryPath() const { return m_repositoryPath; } + + bool gitCloneAndCheckoutBranch(); std::optional gitFetch(); bool gitFetchAndDiff();