mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-09 09:22:50 +00:00
There have been a number of users confused about why their commits are immutable, or what to do about it, ex. [https://github.com/jj-vcs/jj/discussions/5659]. Separately, I feel that the cli is too quick to suggest `--ignore-immutable`, without context of the consequences. A new user could see that the command is failing, see a helpful hint to make it not fail, apply it and move on. This has wildly different consequences, from `jj squash --into someone_elses_branch@origin` rewriting a single commit, to `jj edit 'root()+'` rewriting your entire history. This commit changes the immutable hint by doing the following: * Adds a short description of what immutable commits are used for, and a link to the relevant docs, to the hint message. * Shows the number of immutable commits that would be rewritten if the operation had succeeded. * Removes the suggestion to use `--ignore-immutable`.