lazygit
lazygit copied to clipboard
Fix multi selection stage/discard not working for files with substrings
- PR Description
I found an issue with multi selection stage/discard. Here is a minimal repro:
git init
touch a
touch aa
lazygit
Select both files using shift and hit space. Only a is staged.
- Please check if the PR fulfills these requirements
- [ ] Cheatsheets are up-to-date (run
go generate ./...) - [x] Code has been formatted (see here)
- [x] Tests have been added/updated (see here for the integration test guide)
- [ ] Text is internationalised (see here)
- [ ] Docs have been updated if necessary
- [x] You've read through your own file changes for silly mistakes etc
@brandondong could you make an integration test for this?
To try for a realistic scenario in the test, I added the workflow that led to me discovering this issue in the first place: renaming a file by adding a suffix and then trying to range select and stage both the deleted and added file.
great work @brandondong thanks for making this