use ls-tree instead of ls-files
authorMichael Wallner <mike@php.net>
Sun, 8 Mar 2015 19:54:31 +0000 (20:54 +0100)
committerMichael Wallner <mike@php.net>
Mon, 9 Mar 2015 07:51:29 +0000 (08:51 +0100)
src/pharext/SourceDir/Git.php

index a16b1e67769726e26c912b7d9883edcd2635dca9..df52101b3f043bb9bbd74eba1276c3b4d40409f4 100644 (file)
@@ -46,7 +46,7 @@ class Git implements \IteratorAggregate, SourceDir
        private function generateFiles() {
                $pwd = getcwd();
                chdir($this->path);
-               if (($pipe = popen("git ls-files", "r"))) {
+               if (($pipe = popen("git ls-tree -r --name-only HEAD", "r"))) {
                        while (!feof($pipe)) {
                                if (strlen($file = trim(fgets($pipe)))) {
                                        if ($this->cmd->getArgs()->verbose) {