Page MenuHomePhabricator

Use $EDITOR to prompt users when creating a new commit out of dirty working copy changes
ClosedPublic

Authored by epriestley on Feb 21 2015, 12:38 AM.
Tags
None
Referenced Files
F12832902: D11843.diff
Thu, Mar 28, 1:42 PM
Unknown Object (File)
Tue, Mar 26, 8:19 AM
Unknown Object (File)
Tue, Mar 19, 1:24 AM
Unknown Object (File)
Tue, Mar 12, 11:05 PM
Unknown Object (File)
Mon, Mar 4, 8:36 PM
Unknown Object (File)
Thu, Feb 29, 12:29 PM
Unknown Object (File)
Thu, Feb 29, 10:43 AM
Unknown Object (File)
Feb 16 2024, 9:57 AM
Subscribers
Tokens
"Doubloon" token, awarded by btrahan.

Details

Summary

Fixes T7344.
Currently, we use phutil_console_prompt(), which isn't a very good editor. Use the real $EDITOR instead.

100% of the logic here was also a gigantic mess. Clean it up.

Test Plan

Will update in a second with console output from this run.

Diff Detail

Repository
rARC Arcanist
Branch
eprompt
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4591
Build 4605: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Use $EDITOR to prompt users when creating a new commit out of dirty working copy changes.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

Here's an example run of the new logic:

Screen_Shot_2015-02-20_at_4.38.41_PM.png (660×1 px, 88 KB)

When I answered "y" to the first prompt on a previous run (with no local commit), it popped $EDITOR properly.

This might be a little hard to follow, but the old logic was like:

do stuff for untracked files;
do weird magic;
do stuff for unstaged files;
more weird magic;
do stuff for uncommitted files;
all weird magic conspires;

New logic is more like:

tell the user about all the problems;
do weird magic
src/workflow/ArcanistWorkflow.php
1056

This fixes a small bug introduced in D11667, see note there.

btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 21 2015, 4:26 AM
This revision was automatically updated to reflect the committed changes.