Better error handling in the commit log

This commit is contained in:
Klaus Silveira
2012-06-07 02:37:45 -03:00
parent 484c72679a
commit 8092f9c3c8

View File

@@ -333,6 +333,10 @@ class Repository
$commit->importData($data);
unset($logs[0]);
if (empty($logs[1])) {
throw new \RuntimeException('No commit log available');
}
// Read diff logs
foreach ($logs as $log) {
if ('diff' === substr($log, 0, 4)) {