Issue 112 - small fix for files with spaces

This commit is contained in:
Nathan Adams 2016-04-26 23:49:24 -05:00
parent 490ce3dd08
commit fb4d886c18

View File

@ -786,9 +786,9 @@ class IDF_Scm_Git extends IDF_Scm
$rawlog = implode("\n", array_reverse($rawlog)); $rawlog = implode("\n", array_reverse($rawlog));
foreach(explode("\n", $rawlog) as $line) { foreach(explode("\n", $rawlog) as $line) {
if ($line[0] == ":") { if ($line[0] == ":") {
$matches = preg_split('/\s/', $line); preg_match('/\:([0-9]{6}) ([0-9]{6}) ([0-9a-z]{40}) ([0-9a-z]{40}) ([A-Z]{1})\s(.*)$/', $line, $matches);
$currentFileHash = $matches[3]; $currentFileHash = $matches[4];
$file = $matches[5]; $file = $matches[6];
$fileinfoarr[] = [ $fileinfoarr[] = [
"filehash" => $currentFileHash, "filehash" => $currentFileHash,
"file" => $file "file" => $file