Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/blame/DiffusionGitBlameQuery.php
| <?php | <?php | ||||
| final class DiffusionGitBlameQuery extends DiffusionBlameQuery { | final class DiffusionGitBlameQuery extends DiffusionBlameQuery { | ||||
| protected function newBlameFuture(DiffusionRequest $request, $path) { | protected function newBlameFuture(DiffusionRequest $request, $path) { | ||||
| $repository = $request->getRepository(); | $repository = $request->getRepository(); | ||||
| $commit = $request->getCommit(); | $commit = $request->getCommit(); | ||||
| // NOTE: The "--root" flag suppresses the addition of the "^" boundary | // NOTE: The "--root" flag suppresses the addition of the "^" boundary | ||||
| // commit marker. Without it, root commits render with a "^" before them, | // commit marker. Without it, root commits render with a "^" before them, | ||||
| // and one fewer character of the commit hash. | // and one fewer character of the commit hash. | ||||
| return $repository->getLocalCommandFuture( | return $repository->getLocalCommandFuture( | ||||
| '--no-pager blame --root -s -l %s -- %s', | '--no-pager blame --root -s -l %s -- %s', | ||||
| $commit, | gitsprintf('%s', $commit), | ||||
| $path); | $path); | ||||
| } | } | ||||
| protected function resolveBlameFuture(ExecFuture $future) { | protected function resolveBlameFuture(ExecFuture $future) { | ||||
| list($err, $stdout) = $future->resolve(); | list($err, $stdout) = $future->resolve(); | ||||
| if ($err) { | if ($err) { | ||||
| return null; | return null; | ||||
| Show All 14 Lines | |||||