From: Jakub Vrana Date: Thu, 14 Feb 2013 18:32:30 +0000 (-0800) Subject: Decide whether to commit or amend with arc diff -a X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7803b7da27885fedec32231c8f20734677156fcc;p=arcanist.git Decide whether to commit or amend with arc diff -a Test Plan: $ arc diff -a $ arc diff -a # saw amend instead of a new commit Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4947 --- diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 1b3a96bc..421e2506 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -916,12 +916,13 @@ abstract class ArcanistBaseWorkflow extends Phobject { private function askForAdd() { if ($this->commitMode == self::COMMIT_DISABLE) { return false; - } else if ($this->commitMode == self::COMMIT_ENABLE) { - return true; } if ($this->shouldAmend === null) { $this->shouldAmend = $this->shouldAmend(); } + if ($this->commitMode == self::COMMIT_ENABLE) { + return true; + } if ($this->shouldAmend) { $prompt = "Do you want to amend these files to the commit?"; } else {