diff --git a/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php b/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php index 6cc659af..5576d357 100644 --- a/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php +++ b/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php @@ -133,6 +133,7 @@ final class ArcanistConfigurationDrivenUnitTestEngine $engine ->setWorkingCopy($this->getWorkingCopy()) ->setEnableCoverage($this->getEnableCoverage()) + ->setConfigurationManager($this->getConfigurationManager()) ->setRenderer($renderer); // TODO: At some point, maybe we should emit a warning here if an engine diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php index a2b3fe40..dba98fb0 100644 --- a/src/workflow/ArcanistPatchWorkflow.php +++ b/src/workflow/ArcanistPatchWorkflow.php @@ -714,9 +714,6 @@ EOTEXT throw new ArcanistUsageException(pht('Unable to apply patch!')); } - // in case there were any submodule changes involved - $repository_api->execPassthru('submodule update --init --recursive'); - if ($this->shouldCommit()) { if ($bundle->getFullAuthor()) { $author_cmd = csprintf('--author=%s', $bundle->getFullAuthor()); @@ -754,6 +751,11 @@ EOTEXT } } + // Synchronize submodule state, since the patch may have made changes + // to ".gitmodules". We do this after we finish managing branches so + // the behavior is correct under "--nobranch"; see PHI648. + $repository_api->execPassthru('submodule update --init --recursive'); + echo phutil_console_format( "** %s ** %s\n", pht('OKAY'),