mirror of
https://github.com/unisonweb/unison.git
synced 2024-08-15 13:30:27 +03:00
900 B
900 B
Undo
Undo should pop a node off of the history of the current branch.
x = 1
scratch/main> builtins.merge lib.builtins
scratch/main> add
scratch/main> ls
scratch/main> alias.term x y
scratch/main> ls
scratch/main> history
scratch/main> undo
scratch/main> ls
scratch/main> history
It should not be affected by changes on other branches.
x = 1
scratch/branch1> builtins.merge lib.builtins
scratch/branch1> add
scratch/branch1> ls
scratch/branch1> alias.term x y
scratch/branch1> ls
scratch/branch1> history
-- Make some changes on an unrelated branch
scratch/branch2> builtins.merge lib.builtins
scratch/branch2> delete.namespace lib
scratch/branch1> undo
scratch/branch1> ls
scratch/branch1> history
Undo should be a no-op on a newly created branch
scratch/main> branch.create-empty new
scratch/new> undo