-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: op undo: show a warning when undoing an undo operation
One common issue that users run into with `jj undo` is that they expect it to behave like an "undo stack", in which every consecutive `jj undo` execution moves the current state further back in history. This is (currently) an incorrect intuition - running multiple `jj undo` commands back-to-back will only result in the previous non-undo change being reverted, then un-reverted, then reverted, and so on. This change adds a hint when the user runs `jj undo` multiple times consecutively, suggesting that they may be looking for `jj restore`, which allows them to revert the whole state of the repository back to a previous snapshot.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters