Skip to content

Fix bulk staging of collapsed untracked directories - #1464

Open
hezhizhen wants to merge 1 commit into
jonas:masterfrom
hezhizhen:codex/fix-collapsed-directory-staging
Open

hezhizhen wants to merge 1 commit into
jonas:masterfrom
hezhizhen:codex/fix-collapsed-directory-staging

Conversation

@hezhizhen

Copy link
Copy Markdown
Contributor

With status-show-untracked-dirs = no, pressing u on Untracked files: stages individual files but skips collapsed directories because git update-index ignores directory paths.

Stage collapsed directories through the existing git add path before batching the remaining files.

The regression checks the index for both a file inside a collapsed directory and a standalone file. It fails on master and passes with the fix, along with the focused status and stage tests under AddressSanitizer.

When status-show-untracked-dirs is disabled, staging the Untracked files
section sends collapsed directory paths to git update-index, which ignores
them. Stage those directories before opening the batch for individual files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant