jesseduffield / lazygit

simple terminal UI for git commands
MIT License
51.38k stars 1.8k forks source link

Fix multi selection stage/discard not working for files with substrings #3599

Closed brandondong closed 2 months ago

brandondong commented 4 months ago

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.

jesseduffield commented 4 months ago

@brandondong could you make an integration test for this?

brandondong commented 4 months ago

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.

jesseduffield commented 2 months ago

great work @brandondong thanks for making this