Repository navigation
fix: only-dir with duplicate top level names - #644
Open
ChandraChaan wants to merge 2 commits into
Open
ChandraChaan wants to merge 2 commits into
ChandraChaan wants to merge 2 commits into
Conversation
When several inputs share a name, handle_duplicate_top_level_names renames them to e.g. "dup_name(dave)". always_add_children then checked those names with is_dir(), which is false for a path that does not exist, so `dust -D a/dup_name b/dup_name` printed only the (total) line. Top level nodes (depth 0) are no longer checked on disk, as with a single input whose root is never checked.
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.
dust -Dwith two inputs that have the same name prints only the total:handle_duplicate_top_level_namesrenames the inputs to.../dave/dup_name(dave)and.../andy/dup_name(andy). With--only-dir,always_add_childrenthen filters the children of(total)withc.name.is_dir(), which is false for those renamed paths since they don't exist, so both inputs are dropped.Top level nodes (depth 0) are now not checked on disk. With a single input the root is never checked either, so this makes several inputs behave the same way. Deeper nodes are still filtered with
is_dir().Added
test_handle_duplicate_names_only_dirnext totest_handle_duplicate_names, using the existingtests/test_dir_matchingfixtures.I ran the CICD workflow on my fork:
master): the new test fails on every build job that runs tests (34 passed, 1 failed), printing only the(total)line above. https://github.com/ChandraChaan/dust/actions/runs/41421556949