UPSTREAM PR #2525: fix(status): ignore nested empty directory trees#44
Open
UPSTREAM PR #2525: fix(status): ignore nested empty directory trees#44
Conversation
Propagate the empty-directory property when a collapsed directory only contains empty subdirectories so status keeps treating the whole tree as empty. Add a regression fixture and status test for nested empty directory trees, and update the dirwalk expectation for collapsed empty-only directories. Co-authored-by: OpenAI Codex <[email protected]>
e902b63 to
c6739bc
Compare
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.
Note
Source pull request: GitoxideLabs/gitoxide#2525
Closes #2490
gix statustreated directory trees that only contain empty directories as untracked because collapsing them dropped theEmptyDirectoryproperty. That madegix status --submodules allreport a clean submodule as modified when it only contained nested empty directories.Before:
gix statusshowed? empty/for a repository that only had an empty directory treegix status --submodules allreportedM configin the issue reproducer even thoughgit status --short --ignore-submodules=nonewas cleanAfter:
EmptyDirectorypropertyValidation:
cargo test -p gix-dir empty -- --nocapturecargo test -p gix --test gix nested_empty_directories_are_ignored -- --nocapturecargo test -p gix --test gix submodule_modification -- --nocapture