]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Prompt user for commit message when auto-committing
authorJonathan Hitchcock <jonathan.hitchcock@gmail.com>
Tue, 14 Jan 2014 23:20:08 +0000 (15:20 -0800)
committerepriestley <git@epriestley.com>
Tue, 14 Jan 2014 23:27:50 +0000 (15:27 -0800)
See: <https://github.com/facebook/arcanist/pull/137>

Reviewed by: epriestley

src/workflow/ArcanistBaseWorkflow.php

index bcfbda8633f15f56ab6d6db67640ef1f4b3e3f98..c88c9bbc72f2d4104d7b4f9f91af480aab1379a0 100644 (file)
@@ -908,7 +908,11 @@ abstract class ArcanistBaseWorkflow extends Phobject {
         $commit = head($api->getLocalCommitInformation());
         $api->amendCommit($commit['message']);
       } else if ($api->supportsLocalCommits()) {
-        $api->doCommit(self::AUTO_COMMIT_TITLE);
+        $commit_message = phutil_console_prompt("Enter commit message:");
+        if ($commit_message == '') {
+          $commit_message = self::AUTO_COMMIT_TITLE;
+        }
+        $api->doCommit($commit_message);
       }
     }
   }