-
Notifications
You must be signed in to change notification settings - Fork 351
/
Copy pathgit.h
36 lines (27 loc) · 937 Bytes
/
git.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef Header_Git
#define Header_Git
#include "mostQtHeaders.h"
/*!
* \brief GIT class
* This class provides easy access to the git command.
*/
class GIT : public QObject
{
Q_OBJECT
public:
enum Status {Unknown, Unmanaged, Modified, Locked, CheckedIn, InConflict, NoRepository};
explicit GIT(QObject *parent = Q_NULLPTR);
static QString quote(QString filename);
static QString makeCmd(QString action, QString args);
void commit(QString filename, QString message);
void push(QString filename);
Status status(QString filename);
QStringList log(QString filename);
void createRepository(QString filename);
QString runGit(QString action, QString args);
QString runGit(QString action, QString path,QString args);
signals:
void runCommand(const QString &commandline, QString *output);
void statusMessage(const QString &message);
};
#endif // GIT_H