Make Git panel file actions work with multiple selections (#64640)
# Objective
Make Git panel file actions apply to the current multi-selection. View
File and several context-menu actions currently act on only the focused
row.
## Solution
- Open every selected file, file diff, and tracked file history.
- Copy selected paths as newline-separated text, preserving explicitly
selected directory paths.
- Add multiple selected untracked files to `.gitignore` or
`.git/info/exclude`.
- Show plural menu labels and avoid processing a partially staged path
twice when it appears in two sections.
- Keep single-file actions and the existing stage/discard behavior.
## Testing
- `cargo test -p git_ui --lib` — 164 passed on Windows.
- `cargo fmt --all -- --check` — passed.
- `git diff --check` — passed.
- New regression tests cover multi-file tabs, diffs, histories, path
copying, ignore/exclude writes, and duplicate status rows.
Release Notes:
- Improved Git panel file actions for multiple selected files.
---------
Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
651d693d42Zhaokang Jiang committed on 10/2/2026, 8:09:25 AM· committed by GitHubparent07310d0