1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Autocomplete branch names in arc feature

Summary: SPOOKY

Test Plan: `arc feature <tab>`

Reviewers: cpojer, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7376
This commit is contained in:
epriestley 2013-10-21 16:29:08 -07:00
parent 831fc9a92b
commit 5c2f7b2abd

View file

@ -48,7 +48,7 @@ EOTEXT
}
public function requiresAuthentication() {
return !$this->getArgument('names');
return !$this->getArgument('branch');
}
@ -60,7 +60,7 @@ EOTEXT
'by-status' => array(
'help' => 'Sort branches by status instead of time.',
),
'*' => 'names',
'*' => 'branch',
);
}
@ -72,7 +72,7 @@ EOTEXT
'arc feature is only supported under Git and Mercurial.');
}
$names = $this->getArgument('names');
$names = $this->getArgument('branch');
if ($names) {
if (count($names) > 2) {
throw new ArcanistUsageException("Specify only one branch.");
@ -109,7 +109,7 @@ EOTEXT
if (isset($names[1])) {
$start = $names[1];
} else {
$start = $this->getWorkingCopy()->getConfigFromAnySource(
$start = $this->getConfigFromAnySource(
'arc.feature.start.default');
}