forked from mirrors/jj
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:
parent
32fef364ef
commit
a80259c7d3
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
let (new_adds, all_files) = chmod_conflict_sides(conflict.adds(), executable_bit);
|
||||||
if !all_files {
|
if !all_files {
|
||||||
return Err(user_error_with_path(
|
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 =
|
let new_conflict_id =
|
||||||
|
|
|
@ -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"]);
|
let stderr = test_env.jj_cmd_failure(&repo_path, &["chmod", "x", "file", "-r=file_dir"]);
|
||||||
insta::assert_snapshot!(stderr, @r###"
|
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
|
// The file_deletion conflict can be chmod-ed
|
||||||
|
|
Loading…
Reference in a new issue