Git: Better status resolving

Do not consider new files as Changed

Change-Id: Id1ddb870e51a974a2d20fc2ecc9fb499d1db6f8c
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Orgad Shaneh
2012-06-25 14:30:46 +03:00
committed by Tobias Hunger
parent 17eedb2af9
commit 616cb86ea7

View File

@@ -1552,9 +1552,11 @@ GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory, bo
return StatusFailed;
}
// Unchanged (output text depending on whether -u was passed)
if (outputText.count('\n') == 1)
return StatusUnchanged;
return StatusChanged;
QList<QByteArray> lines = outputText.split('\n');
foreach (const QByteArray &line, lines)
if (!line.isEmpty() && !line.startsWith('#') && !line.startsWith('?'))
return StatusChanged;
return StatusUnchanged;
}
// Quietly retrieve branch list of remote repository URL