feat: gitignore range select - #5860
Open
phanen wants to merge 3 commits into
Open
Conversation
The gitignore-applier layer now takes a slice, looping over paths. The files_controller plumbing still feeds a single-element slice so behavior is unchanged for the single-file case; this prepares for wiring the binding up to multi-select.
The `i` keybinding in the files panel now accepts a range selection of nodes: every selected file is unstaged, removed from the index if it was tracked, and appended to `.gitignore` (or `.git/info/exclude` on the other menu entry) on its own line. Plumbing switched from a single node to a slice of nodes so the tracked /untracked split unstage-and-rm each path before writing the list. The single-file path keeps the existing `.gitignore`-self-ignore guard.
A range select that crosses a tracked directory boundary breaks because `git rm -r --cached -- dir` removes its descendants from the index, so a subsequent child-targeted call fails with pathspec errors. Untracked nodes in a mixed range hit the same problem since they aren't in the index at all. Filter the selection through `normalisedSelectedNodes` and only unstage/rm the nodes that are actually tracked.
phanen
force-pushed
the
feat/ignore-range
branch
from
July 25, 2026 16:24
f2b1348 to
6905d62
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.
PR Description
Please check if the PR fulfills these requirements
go generate ./...)