From a80259c7d35fd7fe50048733ba6cd19c433906ec Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 13 Aug 2023 23:28:59 -0700 Subject: [PATCH] cli: say that `jj chmod` errors out if there are any non-file sides `jj chmod` won't operate on conflicts involving non-files on the positive sides. However, the error message says "None of the sides of the conflict are files", which is not correct. --- cli/src/commands/mod.rs | 2 +- cli/tests/test_chmod_command.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/mod.rs b/cli/src/commands/mod.rs index eac98dfce..7061afb87 100644 --- a/cli/src/commands/mod.rs +++ b/cli/src/commands/mod.rs @@ -2667,7 +2667,7 @@ fn cmd_chmod(ui: &mut Ui, command: &CommandHelper, args: &ChmodArgs) -> Result<( let (new_adds, all_files) = chmod_conflict_sides(conflict.adds(), executable_bit); if !all_files { return Err(user_error_with_path( - "None of the sides of the conflict are files", + "Some of the sides of the conflict are not files", )); } let new_conflict_id = diff --git a/cli/tests/test_chmod_command.rs b/cli/tests/test_chmod_command.rs index 0544a94ad..f258720e1 100644 --- a/cli/tests/test_chmod_command.rs +++ b/cli/tests/test_chmod_command.rs @@ -171,7 +171,7 @@ fn test_chmod_file_dir_deletion_conflicts() { "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["chmod", "x", "file", "-r=file_dir"]); insta::assert_snapshot!(stderr, @r###" - Error: None of the sides of the conflict are files at 'file'. + Error: Some of the sides of the conflict are not files at 'file'. "###); // The file_deletion conflict can be chmod-ed