Save for the weekend.

This commit is contained in:
2023-10-20 13:55:18 +02:00
parent 29e6a25e72
commit 81c5f8ee7e
10 changed files with 581 additions and 259 deletions

View File

@@ -279,6 +279,17 @@ std::optional<QStringList> GitClient::gitDiff(QString const &commits) {
return std::nullopt;
}
bool GitClient::gitFsck() {
bool r = false;
if (QDir(m_customerRepository).exists()) {
Command c("git fsck");
if ((r = c.execute(m_customerRepository)) == false) {
QString const &s = c.getCommandResult().trimmed();
Utils::printCriticalErrorMsg(QString("GIT FSCK FAILED: %1").arg(s));
}
}
return r;
}
/*
Hat sich nichts geaendert, so werden auch keine Commits <>..<> angezeigt
*/

View File

@@ -47,6 +47,8 @@ class GitClient : public QObject {
std::optional<QStringList> gitDiff(QString const &commit);
std::optional<QStringList> gitMerge();
bool gitFsck();
QString gitLastCommit(QString fileName);
QStringList gitShowReason(QString branchName);
static QString gitBlob(QString fileName);