Fix the ! bug, better test draft

This commit is contained in:
Kirill Bulatov 2023-11-15 10:15:50 +02:00
parent 26f7e66b49
commit ce2cfc6035
2 changed files with 86 additions and 33 deletions

View file

@ -2123,7 +2123,7 @@ impl LocalSnapshot {
let mut ignore_stack = IgnoreStack::none();
for (parent_abs_path, ignore) in new_ignores.into_iter().rev() {
if !ignore_stack.is_abs_path_ignored(parent_abs_path, true) {
if ignore_stack.is_abs_path_ignored(parent_abs_path, true) {
ignore_stack = IgnoreStack::all();
break;
} else if let Some(ignore) = ignore {
@ -2131,7 +2131,7 @@ impl LocalSnapshot {
}
}
if !ignore_stack.is_abs_path_ignored(abs_path, is_dir) {
if ignore_stack.is_abs_path_ignored(abs_path, is_dir) {
ignore_stack = IgnoreStack::all();
}
ignore_stack