diff --git a/src/land/ArcanistGitLandEngine.php b/src/land/ArcanistGitLandEngine.php --- a/src/land/ArcanistGitLandEngine.php +++ b/src/land/ArcanistGitLandEngine.php @@ -541,40 +541,42 @@ } private function didHoldChanges() { - $this->writeInfo( - pht('HOLD'), - pht( - 'Holding change locally, it has not been pushed.')); - - $push_command = csprintf( - '$ git push -- %R %R:%R', - $this->getTargetRemote(), - $this->mergedRef, - $this->getTargetOnto()); - - $restore_command = csprintf( - '$ git checkout %R --', - $this->localRef); + if (!$this->getShouldSuppressHoldOutput()) { + $this->writeInfo( + pht('HOLD'), + pht( + 'Holding change locally, it has not been pushed.')); - echo tsprintf( - "\n%s\n\n". - "%s\n\n". - " %s\n\n". - "%s\n\n". - " %s\n\n". - "%s\n", - pht( - 'This local working copy now contains the merged changes in a '. - 'detached state.'), - pht('You can push the changes manually with this command:'), - $push_command, - pht( - 'You can go back to how things were before you ran `arc land` with '. - 'this command:'), - $restore_command, - pht( - 'Local branches have not been changed, and are still in exactly the '. - 'same state as before.')); + $push_command = csprintf( + '$ git push -- %R %R:%R', + $this->getTargetRemote(), + $this->mergedRef, + $this->getTargetOnto()); + + $restore_command = csprintf( + '$ git checkout %R --', + $this->localRef); + + echo tsprintf( + "\n%s\n\n". + "%s\n\n". + " %s\n\n". + "%s\n\n". + " %s\n\n". + "%s\n", + pht( + 'This local working copy now contains the merged changes in a '. + 'detached state.'), + pht('You can push the changes manually with this command:'), + $push_command, + pht( + 'You can go back to how things were before you ran `arc land` with '. + 'this command:'), + $restore_command, + pht( + 'Local branches have not been changed, and are still in exactly the '. + 'same state as before.')); + } } } diff --git a/src/land/ArcanistLandEngine.php b/src/land/ArcanistLandEngine.php --- a/src/land/ArcanistLandEngine.php +++ b/src/land/ArcanistLandEngine.php @@ -9,6 +9,7 @@ private $sourceRef; private $commitMessageFile; private $shouldHold; + private $shouldSuppressHoldOutput; private $shouldKeep; private $shouldSquash; private $shouldDeleteRemote; @@ -45,6 +46,15 @@ return $this->shouldHold; } + final public function setShouldSuppressHoldOutput($should_suppress_hold_output) { + $this->shouldSuppressHoldOutput = $should_suppress_hold_output; + return $this; + } + + final public function getShouldSuppressHoldOutput() { + return $this->shouldSuppressHoldOutput; + } + final public function setShouldKeep($should_keep) { $this->shouldKeep = $should_keep; return $this; diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php --- a/src/workflow/ArcanistLandWorkflow.php +++ b/src/workflow/ArcanistLandWorkflow.php @@ -152,6 +152,11 @@ 'help' => pht( 'Prepare the change to be pushed, but do not actually push it.'), ), + 'suppress-hold-output' => array( + 'hide' => true, + 'help' => pht( + 'Do not render hold output.'), + ), 'keep-branch' => array( 'help' => pht( 'Keep the feature branch after pushing changes to the '.