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
Is your feature request related to a problem? Please describe.
in git, if the description is empty, it will cancel the commit altogether. jj instead creates a commit with an empty description.
this is ok, but it's probably not the intended behavior, especially if this is overwriting a previously non-empty description, or if the diff is empty.
Describe the solution you'd like
jj should prompt interactively if you're sure in the following cases:
jj describe overwriting a non-empty description to empty
jj new creating an empty description for an empty diff (in the parent, to be clear, of course the working copy will be empty at first)
jj commit creating an empty description, regardless of the diff contents; people have muscle memory from git that an empty description cancels the commit.
Describe alternatives you've considered
only warn for a subset of these cases
don't add any warnings. i would prefer not to do this, i think it's a footgun.
add these warnings, but add a -y/--yes flag to ignore the warnings, restoring the current behavior.
I think a warning is good as the user can simply jj undo. Interactive prompt is sometimes annoying.
git-branchless after hiding (abandoning) commits will print out a message like Hid X commits. If this was unintentional, run: git undo, and this is good because it doubles as an onboarding workflow, even if you never undo that operation in particular. We could conceivably add (more?) notes/warnings to run jj undo in various commands, including this one.
Is your feature request related to a problem? Please describe.
in git, if the description is empty, it will cancel the commit altogether. jj instead creates a commit with an empty description.
this is ok, but it's probably not the intended behavior, especially if this is overwriting a previously non-empty description, or if the diff is empty.
Describe the solution you'd like
jj should prompt interactively if you're sure in the following cases:
jj describe
overwriting a non-empty description to emptyjj new
creating an empty description for an empty diff (in the parent, to be clear, of course the working copy will be empty at first)jj commit
creating an empty description, regardless of the diff contents; people have muscle memory from git that an empty description cancels the commit.Describe alternatives you've considered
-y
/--yes
flag to ignore the warnings, restoring the current behavior.Additional context
cc #2976
The text was updated successfully, but these errors were encountered: