]> khamidou — GitHub mirrors - arcanist.git/commit
Improve handling of commit message on --auto/--update/--create workflows
authorepriestley <git@epriestley.com>
Tue, 21 Feb 2012 20:35:39 +0000 (12:35 -0800)
committerepriestley <git@epriestley.com>
Tue, 21 Feb 2012 20:35:39 +0000 (12:35 -0800)
commit964bdb63bafad22005184c65ffa2128472ca992a
tree86888cab5462efe1599a2a1675026b23a5b7f9cc
parent4a0bd01550619c7b831056d88fceac21f3884900
Improve handling of commit message on --auto/--update/--create workflows

Summary:
Our failure behavior currently sucks. In particular:

  - If lint or unit fail (expectedly or unexpectedly), we throw away your
message. omglol sux 2 b u
  - If there's a parsing error, we dump the message to 'arc-commit-message' in
CWD and tell you to go deal with it.

This is awful. Improve the behavior:

  - Once we read a message, save it in .arc/commit-message so we always have it
if anything goes wrong.
  - If that file exists, prompt to read it without any "-F" nonsense.
  - If there's a parsing error, tell the user and prompt them to just edit the
file again, showing what they need to fix.

Test Plan: Ran "arc diff --auto" and made a bunch of intentional errors; arc
never screwed me over and was generally fairly pleasant.

Reviewers: btrahan, Makinde

Reviewed By: btrahan

CC: aran, epriestley
Maniphest Tasks: T614, T895

Differential Revision: https://secure.phabricator.com/D1656
src/workflow/base/ArcanistBaseWorkflow.php
src/workflow/diff/ArcanistDiffWorkflow.php