From: vrana Date: Thu, 7 Feb 2013 02:44:55 +0000 (-0800) Subject: Restore kept branch after landing X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=46dfc643374f5d397beea2855d7bdc1146a91b01;p=arcanist.git 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 --- 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";