]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Autocomplete branch names in `arc feature`
authorepriestley <git@epriestley.com>
Mon, 21 Oct 2013 23:29:08 +0000 (16:29 -0700)
committerepriestley <git@epriestley.com>
Mon, 21 Oct 2013 23:29:08 +0000 (16:29 -0700)
Summary: SPOOKY

Test Plan: `arc feature <tab>`

Reviewers: cpojer, btrahan

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D7376

src/workflow/ArcanistFeatureWorkflow.php

index 9963bd4a721743cd6a8241b61ee7955ffb1100f5..d9830fa70764eb54db98556a3feb7bd09a999a00 100644 (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');
     }