# HG changeset patch # User Raphaël Gomès # Date 2021-05-04 08:46:50 # Node ID c8f62920f07a40af3403ba9aefa1dac8a97d53ea # Parent c365850b611490a5fdb235eb1cea310a542c2f84 rust-status: fix ignore and include not composing (issue6514) While the fix is pretty simple, the overall dispatch logic has become kind of ugly. Thankfully we're currently upstreaming a better algorithm, this code is temporary anyway. Differential Revision: https://phab.mercurial-scm.org/D10639 diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs --- a/rust/hg-core/src/dirstate/status.rs +++ b/rust/hg-core/src/dirstate/status.rs @@ -557,9 +557,11 @@ where .unwrap(); } } else if self.is_ignored(&filename) && self.options.list_ignored { - files_sender - .send((filename.to_owned(), Dispatch::Ignored)) - .unwrap(); + if self.matcher.matches(&filename) { + files_sender + .send((filename.to_owned(), Dispatch::Ignored)) + .unwrap(); + } } } else if let Some(entry) = entry_option { // Used to be a file or a folder, now something else. diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -708,4 +708,3 @@ Check using include flag while listing i I A.hs I B.hs I ignored-folder/ctest.hs - I ignored-folder/other.txt (known-bad-output rust !)