Skip to content

Commit

Permalink
creating new wc commit when @ becomes immuable
Browse files Browse the repository at this point in the history
  • Loading branch information
tdaron committed May 1, 2024
1 parent e54e83b commit a0e60b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cli/src/cli_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit a0e60b9

Please sign in to comment.