Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistGitLandEngine.php
| Show First 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | foreach ($onto_refs as $onto_ref) { | ||||
| if (!strlen($onto_ref)) { | if (!strlen($onto_ref)) { | ||||
| throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
| pht( | pht( | ||||
| 'Selected "onto" ref "%s" is invalid: the empty string is not '. | 'Selected "onto" ref "%s" is invalid: the empty string is not '. | ||||
| 'a valid ref.', | 'a valid ref.', | ||||
| $onto_ref)); | $onto_ref)); | ||||
| } | } | ||||
| } | } | ||||
| // TODO: Check that these refs really exist in the remote? Checking the | |||||
Lint: TODO Comment: This comment has a TODO. | |||||
| // remote is expensive and users probably rarely specify "--onto" manually, | |||||
| // but if "arc land" creates branches without prompting when you make typos | |||||
| // that also seems questionable. | |||||
| } | } | ||||
| protected function selectOntoRefs(array $symbols) { | protected function selectOntoRefs(array $symbols) { | ||||
| assert_instances_of($symbols, 'ArcanistLandSymbol'); | assert_instances_of($symbols, 'ArcanistLandSymbol'); | ||||
| $log = $this->getLogEngine(); | $log = $this->getLogEngine(); | ||||
| $onto = $this->getOntoArguments(); | $onto = $this->getOntoArguments(); | ||||
| if ($onto) { | if ($onto) { | ||||
| ▲ Show 20 Lines • Show All 590 Lines • ▼ Show 20 Lines | protected function getDefaultSymbols() { | ||||
| return array($commit->getCommitHash()); | return array($commit->getCommitHash()); | ||||
| } | } | ||||
| private function newOntoRefArguments($into_commit) { | private function newOntoRefArguments($into_commit) { | ||||
| $refspecs = array(); | $refspecs = array(); | ||||
| foreach ($this->getOntoRefs() as $onto_ref) { | foreach ($this->getOntoRefs() as $onto_ref) { | ||||
| $refspecs[] = sprintf( | $refspecs[] = sprintf( | ||||
| '%s:%s', | '%s:refs/heads/%s', | ||||
| $this->getDisplayHash($into_commit), | $this->getDisplayHash($into_commit), | ||||
| $onto_ref); | $onto_ref); | ||||
| } | } | ||||
| return $refspecs; | return $refspecs; | ||||
| } | } | ||||
| private function confirmLegacyStrategyConfiguration() { | private function confirmLegacyStrategyConfiguration() { | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||
This comment has a TODO.