1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 14:00:55 +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() {
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 {