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.
This commit is contained in:
Martin von Zweigbergk 2023-08-13 23:28:59 -07:00 committed by Martin von Zweigbergk
parent 32fef364ef
commit a80259c7d3
2 changed files with 2 additions and 2 deletions

View file

@ -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 =

View file

@ -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