2025-02-14 13:20:42 +01:00
|
|
|
#ifndef GIT_COMMAND_H_INCLUDED
|
|
|
|
#define GIT_COMMAND_H_INCLUDED
|
|
|
|
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
|
|
|
class QProcess;
|
|
|
|
class GitCommand {
|
|
|
|
static bool initEnv;
|
|
|
|
QString m_workingDirectory;
|
|
|
|
|
|
|
|
bool exec(QStringList const &options, int start_timeout = 100000,
|
|
|
|
int finish_timeout = 100000);
|
2025-02-21 12:37:00 +01:00
|
|
|
|
|
|
|
QString m_commandResult{};
|
|
|
|
|
2025-02-14 13:20:42 +01:00
|
|
|
public:
|
|
|
|
GitCommand();
|
|
|
|
|
2025-02-21 12:37:00 +01:00
|
|
|
void resetCommandResult() { m_commandResult.clear(); }
|
|
|
|
QString const &commandResult() const { return m_commandResult; }
|
2025-02-14 13:20:42 +01:00
|
|
|
|
|
|
|
bool status(int start_timeout = 100000, int finish_timeout = 100000);
|
|
|
|
bool check(int start_timeout = 100000, int finish_timeout = 100000);
|
|
|
|
bool checkout(int start_timeout = 100000, int finish_timeout = 100000);
|
|
|
|
bool clone(int start_timeout = 100000, int finish_timeout = 100000);
|
|
|
|
bool pull(int start_timeout = 100000, int finish_timeout = 100000);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GIT_COMMAND_H_INCLUDED
|