Changeset View
Changeset View
Standalone View
Standalone View
src/inspector/ArcanistWorkingCopyStateRefInspector.php
| Show All 10 Lines | public function newInspectRef(array $argv) { | ||||
| if (count($argv) !== 1) { | if (count($argv) !== 1) { | ||||
| throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
| pht( | pht( | ||||
| 'Expected exactly one argument to "working-copy(...)" with a '. | 'Expected exactly one argument to "working-copy(...)" with a '. | ||||
| 'commit hash.')); | 'commit hash.')); | ||||
| } | } | ||||
| $commit_hash = $argv[0]; | $commit_hash = $argv[0]; | ||||
| $commit_ref = id(new ArcanistCommitRefPro()) | $commit_ref = id(new ArcanistCommitRef()) | ||||
| ->setCommitHash($commit_hash); | ->setCommitHash($commit_hash); | ||||
| return id(new ArcanistWorkingCopyStateRefPro()) | return id(new ArcanistWorkingCopyStateRef()) | ||||
| ->setCommitRef($commit_ref); | ->setCommitRef($commit_ref); | ||||
| } | } | ||||
| } | } | ||||