From 46dfc643374f5d397beea2855d7bdc1146a91b01 Mon Sep 17 00:00:00 2001 From: vrana Date: Wed, 6 Feb 2013 18:44:55 -0800 Subject: [PATCH] Restore kept branch after landing Test Plan: Ran it separately. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4846 --- src/workflow/ArcanistLandWorkflow.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php index 79b3e789..fee7fda1 100644 --- a/src/workflow/ArcanistLandWorkflow.php +++ b/src/workflow/ArcanistLandWorkflow.php @@ -160,10 +160,12 @@ EOTEXT $this->cleanupBranch(); } - // If we were on some branch A and the user ran "arc land B", - // switch back to A. - if ($this->oldBranch != $this->branch && $this->oldBranch != $this->onto) { - $this->restoreBranch(); + if ($this->oldBranch != $this->onto) { + // If we were on some branch A and the user ran "arc land B", + // switch back to A. + if ($this->keepBranch || $this->oldBranch != $this->branch) { + $this->restoreBranch(); + } } echo "Done.\n"; -- 2.43.0