You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of jj-vcs/jj#5393, I made jj diffedit start an scm-record ui with the whole diff selected (by setting is_checked: true everywhere). The issue is that, if the UI starts and you quit with 'q' without changing anything, you get prompted by an undesirable "N files changes, are you sure?" message.
Expected behavior
I expect no prompt when the current state matches the initial state.
Or a less principled solution would be to remove the prompt when everything is selected, since that's cheap to recreate.
Actual behavior
There is a prompt if the selection is non-empty.
Version of rustc
No response
The text was updated successfully, but these errors were encountered:
Thanks for reporting. I think I didn't consider the case of intentionally starting with everything selected when I wrote the check. Comparing against the start state or just allowing the state of everything being checked as a "trivial" no-op both sound fine to me.
In principle, the data structures are designed to support serialization/deserialization and therefore pausing/resuming the UI. In that kind of workflow, determining what's changed might be more subtle (does it mean what's changed since the UI was originally launched, or since the most recent launch?). But nobody uses that functionality at present, so we could ignore/remove it.
I tried earlier adding the initial state next to the is_checked boolean in v-gb@f86002a. It seemed easiest, and in principle it would allow a caller to specify what they consider the "initial" value separately from the current value, thus supporting the kind of pause/resume workflow you're talking about. But that breaks the json stability tests.
Does that look crazy? If yes, then a less invasive version would be to clone record_state.files early, and then diff the vector and the clone when quitting (I assume the structure of inside the vectors won't change, only the checkbox booleans).
Description of the bug
In the context of jj-vcs/jj#5393, I made
jj diffedit
start an scm-record ui with the whole diff selected (by settingis_checked: true
everywhere). The issue is that, if the UI starts and you quit with 'q' without changing anything, you get prompted by an undesirable "N files changes, are you sure?" message.Expected behavior
I expect no prompt when the current state matches the initial state.
Or a less principled solution would be to remove the prompt when everything is selected, since that's cheap to recreate.
Actual behavior
There is a prompt if the selection is non-empty.
Version of
rustc
No response
The text was updated successfully, but these errors were encountered: