From 7803b7da27885fedec32231c8f20734677156fcc Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 14 Feb 2013 10:32:30 -0800 Subject: [PATCH] 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 --- src/workflow/ArcanistBaseWorkflow.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 { -- 2.43.0