teqneers/PHP-Stream-Wrapper-for-Git — pull request #18 by donoftime (2014-04-08 18:40:59+00:00)
Title: Listing of non existent directories

Since the directory specified in a call of `listDirectory()` may not exist on the `HEAD` of the repo, when `proc_open` attempts to use the path created from the directory as the `cwd`, it fails.

This fix uses the `--full-name` option of `git ls-tree` so that the `cwd` may always be the repository root, and the directory may be specified directly in the `git ls-tree` command. And finally, the directory prefix is removed from the full-names to leave only the contained file/directory names.