Differential D17377 Diff 41804 src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | if ($path == '') { | ||||
$stdout = 'tree'; | $stdout = 'tree'; | ||||
} else { | } else { | ||||
try { | try { | ||||
list($stdout) = $repository->execxLocalCommand( | list($stdout) = $repository->execxLocalCommand( | ||||
'cat-file -t %s:%s', | 'cat-file -t %s:%s', | ||||
$commit, | $commit, | ||||
$path); | $path); | ||||
} catch (CommandException $e) { | } catch (CommandException $e) { | ||||
$stderr = $e->getStdErr(); | $stderr = $e->getStderr(); | ||||
if (preg_match('/^fatal: Not a valid object name/', $stderr)) { | if (preg_match('/^fatal: Not a valid object name/', $stderr)) { | ||||
// Grab two logs, since the first one is when the object was deleted. | // Grab two logs, since the first one is when the object was deleted. | ||||
list($stdout) = $repository->execxLocalCommand( | list($stdout) = $repository->execxLocalCommand( | ||||
'log -n2 --format="%%H" %s -- %s', | 'log -n2 --format="%%H" %s -- %s', | ||||
$commit, | $commit, | ||||
$path); | $path); | ||||
$stdout = trim($stdout); | $stdout = trim($stdout); | ||||
if ($stdout) { | if ($stdout) { | ||||
▲ Show 20 Lines • Show All 453 Lines • Show Last 20 Lines |