mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +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:
parent
619dd62f31
commit
7803b7da27
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue