sapling icon indicating copy to clipboard operation
sapling copied to clipboard

'sl undo --keep' shows warning, when it seems that 'sl undo' should show the warning instead

Open neutralinsomniac opened this issue 3 years ago • 2 comments

I make a commit, then do sl undo. sl uncommits as expected, but also reverts the working directory to the previous state (discarding the changes that were in the commit that was just undone). If I instead do sl undo --keep, sl will uncommit as expected, and preserve the working directory to be in the state just before the commit, but also print out the hint[undo-uncommit-unamend] hint that warns about undo discarding changes (and also provides a helpful command for getting those floating changes back into the working directory via an sl revert command).

It seems as if that warning should be displayed on the sl undo case and not on the sl undo --keep case.

neutralinsomniac avatar Nov 17 '22 18:11 neutralinsomniac

This is a known issue. You can use uncommit for now while we rework undo.

quark-zju avatar Nov 17 '22 20:11 quark-zju

Alright. Should I close this issue then? I assume y'all use your own internal issue tracking.

neutralinsomniac avatar Nov 17 '22 20:11 neutralinsomniac