Repository navigation
fix(core): retain empty-match ancestors (port of tobi/disktree#62) - #34
Merged
Merged
Conversation
(cherry picked from commit bad1769)
Harold Hunt (huntharo)
force-pushed
the
port/62-empty-matches
branch
from
October 31, 2026 17:21
6bbe74d to
70c0da3
Compare
Harold Hunt (huntharo)
marked this pull request as ready for review
October 31, 2026 17:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A search match on an empty directory contributes zero bytes and files. Filtering used those totals to decide whether to retain its nonmatching ancestors, so the match could become unreachable.
Extract only the core portion of upstream commit
bad1769fd95d15829eebf5d3be256737c4375678from tobi/disktree#62. Retain ancestors when the descendant match count increases. The regression checks the ancestor, empty match, zero totals and unrelated sibling. No TUI code or other commits from #62 are included.The scanner resource-limit test repair is now on main through #37. This PR changes only
crates/disktree-core/src/filter.rsand preserves Jeremy Dixon’s authorship and the upstream commit reference.At head
70c0da3c4aae5aa43d4e999ffec1be4e448e1124, macOS 27.0.1 arm64cargo xtask lintand the fullcargo xtask testpass. Linux Sandboxersb_qowjafwv7n(Ubuntu 24.04.5 x86_64) lint and full tests also pass, with exit codes 0 and 0. The empty-directory regression passes on both systems. The watched CI checks at this head passed on 2026-10-31 at 17:41:01 UTC, and GitHub reports the PR as mergeable.Screenshot disposition: the changed filter entries have zero bytes and files, hence zero treemap area. The core regression verifies ancestry and reachability; a screenshot of the treemap does not expose that map. No screenshot is attached. The operator explicitly approved regression evidence instead of screenshots on 2026-10-31.
Tracks PWR-28.