diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index e9f05f58..514f6068 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -429,17 +429,20 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { * @param head revision. If this is null, the generated diff will include the * working copy */ - public function getFullGitDiff($base, $head=null) { + public function getFullGitDiff($base, $head = null) { $options = $this->getDiffFullOptions(); - $diff_revision = $base; - if ($head) { - $diff_revision .= '..'.$head; + if ($head !== null) { + list($stdout) = $this->execxLocal( + "diff {$options} %s %s --", + $base, + $head); + } else { + list($stdout) = $this->execxLocal( + "diff {$options} %s --", + $base); } - list($stdout) = $this->execxLocal( - "diff {$options} %s --", - $diff_revision); return $stdout; }