mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-30 19:32:39 +00:00
To identify an `undo` operation, checking that the views of the "bad" op and its grandparent are equal is necessary but not sufficient. For example, creating a bookmark and then immediately deleting it also "resets" the view. This commit fixes this by also checking the "description" in the operation metadata to identify "double undo" properly. With this commit, the "double undo" warning is now shown whether users undid the latest undo implicitly (with `jj (op) undo`) or explicitly (with `jj (op) undo <op set>` or `jj (op) undo @`). If undoing an older undo (prior to `@`), the warning is not shown.