Added utility functions.

This commit is contained in:
Gerhard Hoffmann 2023-07-14 13:12:37 +02:00
parent aeae9002fe
commit 00f5216a9f

View File

@ -17,19 +17,28 @@ class GitClient : public QObject {
QString const m_branchName;
QString const m_customerRepository;
std::optional<QString> 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<QString> 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<QString> gitFetch();
bool gitFetchAndDiff();