From patchwork Tue May 4 08:48:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10639: rust-status: fix ignore and include not composing (issue6514) From: phabricator X-Patchwork-Id: 48958 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 4 May 2021 08:48:18 +0000 Alphare created this revision. Alphare added a comment. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. Pending CI refresh REVISION SUMMARY 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. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D10639 AFFECTED FILES rust/hg-core/src/dirstate/status.rs tests/test-status.t CHANGE DETAILS To: Alphare, #hg-reviewers Cc: mercurial-patches, mercurial-devel 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 @@ I A.hs I B.hs I ignored-folder/ctest.hs - I ignored-folder/other.txt (known-bad-output rust !) 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 @@ .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.