facebookarchive / codemod

Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention. Codemod was developed at Facebook and released as open source.
Apache License 2.0
4.11k stars 198 forks source link

feature request: undo / go back #91

Open rattrayalex-stripe opened 7 years ago

rattrayalex-stripe commented 7 years ago

When making a large, mostly-straightforward codemod, clicking "enter" in rapid succession is the only tolerable modus operandi.

Sometimes, I see things that look potentially problematic, but my feeble human brain doesn't detect this until my eager pinky has already pressed "enter".

It would be nice to have a "b" (or maybe "u") shortcut to the previous diff and reevaluate.

I'm not sure how straightforward that would be to implement 😄

rattrayalex-stripe commented 7 years ago

(In this case, my workaround was to search-within-file for the result string, which was self-contained, in the currently visible file and its (alphabetically preceding) siblings, and I was able to find the change and verify it was ok).