You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
At work, we have a submodule in a nested folder:
All this time, I thought lazygit did not support discarding submodule changes because I would open the tool, get to this screen, press d (Discard changes), hit confirm, and then nothing would happen.
Only today did I discover lazygit does actually support this. I just needed to move the selection down one item and then pressing d + confirm would work as expected.
Expected behavior
The submodule changes should be discarded. The folder only contains submodule changes so it should be no different than pressing discard on the submodule entry itself.
Also, I noticed range selecting both the folder and the submodule and then pressing discard would be disallowed due to
Describe the bug
At work, we have a submodule in a nested folder:
All this time, I thought lazygit did not support discarding submodule changes because I would open the tool, get to this screen, press
d
(Discard changes), hit confirm, and then nothing would happen.Only today did I discover lazygit does actually support this. I just needed to move the selection down one item and then pressing
d
+ confirm would work as expected.The behavior is due to this check:
lazygit/pkg/gui/controllers/files_controller.go
Line 1071 in d11e11d
To Reproduce
Steps to reproduce the behavior:
git init git submodule add https://github.com/jesseduffield/lazygit.git external/buildtools git commit -m "add submodule" git -C external/buildtools checkout HEAD~ lazygit
Press
d
and hit confirm.Expected behavior
The submodule changes should be discarded. The folder only contains submodule changes so it should be no different than pressing discard on the submodule entry itself.
Also, I noticed range selecting both the folder and the submodule and then pressing discard would be disallowed due to
lazygit/pkg/gui/controllers/files_controller.go
Line 1058 in d11e11d
I feel like this should also be allowed.
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Additional context
Add any other context about the problem here.
Note: please try updating to the latest version or manually building the latest
master
to see if the issue still occurs.The text was updated successfully, but these errors were encountered: