Skip to content

Commit

Permalink
describe: warn user that describing multiple commits is experimental
Browse files Browse the repository at this point in the history
I think it might be nice to have this in the upcoming release, but I'd
like to warn people that their changes will be lost if they aren't
careful, and to not rely on the syntax being fixed just yet.
  • Loading branch information
ilyagr committed Aug 4, 2024
1 parent 38478bc commit a2d2c62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/src/description_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ pub fn edit_multiple_descriptions(
bulk_message.push_str(indoc! {r#"
JJ: Enter or edit commit descriptions after the `JJ: describe` lines.
JJ: Warning: Describing multiple commits in one file is currently
JJ: **experimental**.
JJ: - The text you enter will be lost on a syntax error.
JJ: - The syntax may change in the future.
"#});
for (commit_id, temp_commit) in commits.iter() {
let commit_hash = short_commit_hash(commit_id);
Expand Down
5 changes: 5 additions & 0 deletions cli/tests/test_describe_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ fn test_describe_multiple_commits() {
std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###"
JJ: Enter or edit commit descriptions after the `JJ: describe` lines.
JJ: Warning: Describing multiple commits in one file is currently
JJ: **experimental**.
JJ: - The text you enter will be lost on a syntax error.
JJ: - The syntax may change in the future.
JJ: describe 8d650510daad -------
JJ: describe 41659b846096 -------
Expand Down

0 comments on commit a2d2c62

Please sign in to comment.