getRequest(); $repository = $drequest->getRepository(); $commit = $drequest->getCommit(); // If there's no path, get the entire raw diff. $path = nonempty($drequest->getPath(), '.'); $against = $this->getAgainstCommit(); if ($against === null) { $against = $commit.'^'; } $future = $repository->getLocalCommandFuture( 'diff -U %d --git --rev %s:%s -- %s', $this->getLinesOfContext(), $against, $commit, $path); if ($this->getTimeout()) { $future->setTimeout($this->getTimeout()); } list($raw_diff) = $future->resolvex(); return $raw_diff; } }