]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Allow `arc unit --everything` to work without a base commit
authorJoshua Spence <josh@joshuaspence.com>
Thu, 22 Jan 2015 20:21:53 +0000 (07:21 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 22 Jan 2015 20:21:53 +0000 (07:21 +1100)
Summary: Fixes T2461. Similarly to `arc lint --everything`, `arc unit --everything` should work without a base commit.

Test Plan: Removed the `.git/arc/default-relative-commit` file and ran `arc unit --everything`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T2461

Differential Revision: https://secure.phabricator.com/D11459

src/workflow/ArcanistUnitWorkflow.php

index f302ba75e0fe9a4658c1ad9082dd879924c7005b..d2ccdd483a3f7dd33bfc5c2f2b5d148474971405 100644 (file)
@@ -130,7 +130,11 @@ EOTEXT
         'flag runs every test.');
     }
 
-    $paths = $this->selectPathsForWorkflow($paths, $rev);
+    if ($everything) {
+      $paths = iterator_to_array($this->getRepositoryApi()->getAllFiles());
+    } else {
+      $paths = $this->selectPathsForWorkflow($paths, $rev);
+    }
 
     if (!class_exists($engine_class) ||
         !is_subclass_of($engine_class, 'ArcanistUnitTestEngine')) {