Summary: Fixes T5071. If you run `arc diff --raw` from some arbitrary, non-repository directory we incorrectly try to read information out of the working copy. Even if this information is available, `arc diff --raw` should not assume it's accurate (there's no guarantee the diff comes from the working copy).
Test Plan: Ran `arc diff --raw` in an arbitrary directory.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T5071
Differential Revision: https://secure.phabricator.com/D9142
'arcanistProject' => $project_id,
);
- $repository_phid = $this->getRepositoryPHID();
- if ($repository_phid) {
- $data['repositoryPHID'] = $repository_phid;
+ if (!$this->isRawDiffSource()) {
+ $repository_phid = $this->getRepositoryPHID();
+ if ($repository_phid) {
+ $data['repositoryPHID'] = $repository_phid;
+ }
}
return $data;