]> khamidou — GitHub mirrors - arcanist.git/commit
Arcanist - normalize question about unstaged files across workflows (diff vs land)
authorBob Trahan <btrahan@phacility.com>
Fri, 11 Apr 2014 17:52:35 +0000 (10:52 -0700)
committerBob Trahan <btrahan@phacility.com>
Fri, 11 Apr 2014 17:52:35 +0000 (10:52 -0700)
commit77a9c1814063508802d572366958267533c03cd9
treec7763703a9c42fe19df805a3a8c76884d645f782
parent02456c0aed609ce4130d520cd1a05d09de99e491
Arcanist - normalize question about unstaged files across workflows (diff vs land)

Summary:
Fixes T4163. Re-word the question so its the same as in "arc diff". Draw the line though and don't automagically do anything if the user says "Y", 'cuz amending / adding files last minute in 'arc land' and other workflows is batshit insane. Assuming infinite growth in the future, I think its best to get this language consistent now.

I changed the shouldAmend member variable to a shouldAmend() function with a static inside. Previously shouldAmend was getting set as a side effect and it was kind of weird. I thought maybe it was written this way because the calls to the vcs are a little slow or something. As such, I figured caching it in the static was a good idea? Didn't seem awful but maybe a premature optimization with whatever the performance reality turns out to be.

Also a modest amount of bonus pht.

Test Plan: this very diff. i'm going to arc land it laters too.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: chad, epriestley, Korvin

Maniphest Tasks: T4163

Differential Revision: https://secure.phabricator.com/D8753
src/workflow/ArcanistBaseWorkflow.php