From 0b22838ccaa88ff2840f04e0a4b329d741f20144 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 23 Jan 2015 07:21:53 +1100 Subject: [PATCH] Allow `arc unit --everything` to work without a base commit 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/workflow/ArcanistUnitWorkflow.php b/src/workflow/ArcanistUnitWorkflow.php index f302ba75..d2ccdd48 100644 --- a/src/workflow/ArcanistUnitWorkflow.php +++ b/src/workflow/ArcanistUnitWorkflow.php @@ -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')) {