Page MenuHomePhabricator
Paste P1777

Git ls-tree failure
ActivePublic

Authored by ftdysa on May 8 2015, 1:42 PM.
Referenced Files
F396485: Git ls-tree failure
May 8 2015, 1:42 PM
Subscribers
None
<?php
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
);
$process = proc_open("git ls-tree --name-only -r -z '47a20d076e292a34393def481663fcad69e1b6be' -- ''", $descriptorspec, $pipes, '/web/sites/phabricator/repo/PP/');
$content = stream_get_contents($pipes[1]);
$errors = stream_get_contents($pipes[2]);
$return_code = proc_close($process);
var_dump($content) // output from git ls-tree
var_dump($errors); // "" empty string
var_dump($return_code); // -1
$cmd = "cd /web/sites/phabricator/repo/PP/ && git ls-tree --name-only -r -z '47a20d076e292a34393def481663fcad69e1b6be' -- ''";
exec($cmd, $output, $ret);
var_dump($output); // same output as above
var_dump($ret); // 0

Event Timeline

ftdysa changed the title of this paste from untitled to Git ls-tree failure.
ftdysa updated the paste's language from autodetect to php.
ftdysa added a project: Diffusion.