Skip to content

Commit

Permalink
Merge pull request #69 from saurvs/spaces
Browse files Browse the repository at this point in the history
Fix ls-tree parsing bug and use dist: trusty for Travis
  • Loading branch information
klaussilveira committed Jun 19, 2019
2 parents 9a1918c + 48f0e7c commit 4c318fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: php
dist: trusty

php:
- 5.4
Expand Down
5 changes: 4 additions & 1 deletion lib/Gitter/Model/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ public function parse()
continue;
}

$files[] = preg_split("/[\s]+/", $line, 5);
$tabSplit = preg_split("/[\t]+/", $line, 2);
$file = preg_split("/[\s]+/", $tabSplit[0], 4);
$file[] = $tabSplit[1];
$files[] = $file;
}

foreach ($files as $file) {
Expand Down

0 comments on commit 4c318fd

Please sign in to comment.