Differential D21511 Diff 51200 src/applications/diffusion/conduit/DiffusionRefsQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionRefsQueryConduitAPIMethod.php
| Show All 22 Lines | final class DiffusionRefsQueryConduitAPIMethod | ||||
| } | } | ||||
| protected function getGitResult(ConduitAPIRequest $request) { | protected function getGitResult(ConduitAPIRequest $request) { | ||||
| $drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
| $repository = $drequest->getRepository(); | $repository = $drequest->getRepository(); | ||||
| $commit = $request->getValue('commit'); | $commit = $request->getValue('commit'); | ||||
| list($stdout) = $repository->execxLocalCommand( | list($stdout) = $repository->execxLocalCommand( | ||||
| 'log --format=%s -n 1 %s --', | 'log -n 1 %s %s --', | ||||
| '%d', | '--format=%d', | ||||
| $commit); | gitsprintf('%s', $commit)); | ||||
| // %d, gives a weird output format | // %d, gives a weird output format | ||||
| // similar to (remote/one, remote/two, remote/three) | // similar to (remote/one, remote/two, remote/three) | ||||
| $refs = trim($stdout, "() \n"); | $refs = trim($stdout, "() \n"); | ||||
| if (!$refs) { | if (!$refs) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| $refs = explode(',', $refs); | $refs = explode(',', $refs); | ||||
| Show All 18 Lines | |||||