From db3581b8fa56eef0cebcc742fd392a19997f0cc3 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Sat, 31 Aug 2013 14:57:10 -0700 Subject: [PATCH] Don't error on first run of arc diff Summary: When running arc diff in a repository that supports commit ranges, it is possible that the setting for the default relative commit hasn't been set. If this is the case, the user will be prompted. This change makes sure that the prompt happens (and thus the setting is set) before we run the background lint and unit runs. Test Plan: ``` rm .git/arc/default-relative-commit arc diff ``` Reviewers: epriestley Reviewed By: epriestley CC: Korvin, aran Maniphest Tasks: T2351 Differential Revision: https://secure.phabricator.com/D6854 --- src/workflow/ArcanistDiffWorkflow.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 1187fd9f..5bf13e8d 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -433,6 +433,10 @@ EOTEXT array_unshift($argv, '--ansi'); } + if ($this->getRepositoryAPI()->supportsCommitRanges()) { + $this->getRepositoryAPI()->getBaseCommit(); + } + $script = phutil_get_library_root('arcanist').'/../scripts/arcanist.php'; if ($argv) { $lint_unit = new ExecFuture( -- 2.43.0