Test Plan: Ran it separately.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4846
$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";