diff --git a/cli/src/cli_util.rs b/cli/src/cli_util.rs index 33ee97ab43..8469e2acf4 100644 --- a/cli/src/cli_util.rs +++ b/cli/src/cli_util.rs @@ -1313,6 +1313,17 @@ See https://github.com/martinvonz/jj/blob/main/docs/working-copy.md#stale-workin // update it. } } + + let current_wc = self.repo().view().wc_commit_ids().get(self.workspace_id()); + if let Some(wc) = current_wc { + if self.check_rewritable([wc]).is_err() { + writeln!( + ui.warning_default(), + "@ became immutable. You should create a new commit using jj new." + )?; + // Here i should create a new commit. + } + } let settings = &self.settings; if settings.user_name().is_empty() || settings.user_email().is_empty() { writeln!(