1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 23:02:41 +01:00

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
This commit is contained in:
Jakub Vrana 2013-02-14 10:32:30 -08:00 committed by vrana
parent 619dd62f31
commit 7803b7da27

View file

@ -916,12 +916,13 @@ abstract class ArcanistBaseWorkflow extends Phobject {
private function askForAdd() { private function askForAdd() {
if ($this->commitMode == self::COMMIT_DISABLE) { if ($this->commitMode == self::COMMIT_DISABLE) {
return false; return false;
} else if ($this->commitMode == self::COMMIT_ENABLE) {
return true;
} }
if ($this->shouldAmend === null) { if ($this->shouldAmend === null) {
$this->shouldAmend = $this->shouldAmend(); $this->shouldAmend = $this->shouldAmend();
} }
if ($this->commitMode == self::COMMIT_ENABLE) {
return true;
}
if ($this->shouldAmend) { if ($this->shouldAmend) {
$prompt = "Do you want to amend these files to the commit?"; $prompt = "Do you want to amend these files to the commit?";
} else { } else {