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 ArcanistCommitRef()) | $commit_ref = (new ArcanistCommitRef()) | ||||
->setCommitHash($commit_hash); | ->setCommitHash($commit_hash); | ||||
return id(new ArcanistWorkingCopyStateRef()) | return (new ArcanistWorkingCopyStateRef()) | ||||
->setCommitRef($commit_ref); | ->setCommitRef($commit_ref); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0