Use head -n 1 in gitLastCommit().
This commit is contained in:
parent
0e97ce7dc2
commit
769626581f
@ -268,6 +268,7 @@ QString GitClient::gitLastCommit(QString fileName) {
|
||||
if (QDir(m_customerRepository).exists()) {
|
||||
QString const filePath
|
||||
= QDir::cleanPath(m_customerRepository + QDir::separator() + fileName);
|
||||
if (QFile(filePath).exists()) {
|
||||
QString const gitCommand = QString("git log %1 | head -n 1").arg(fileName);
|
||||
Command c("bash");
|
||||
if (c.execute(m_customerRepository, QStringList() << "-c" << gitCommand)) {
|
||||
@ -278,6 +279,7 @@ QString GitClient::gitLastCommit(QString fileName) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user