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
As described above, when attempting to unstage a submodule's changes with spacebar after staging said changes, instead of unstaging the currently staged changes within the submodule it quickly moves the changes from "staged" to "unstaged" and back again. This behaviour only occurs when the submodule has uncommitted changes within itself.
To Reproduce
Create a git repository
Create a submodule within said git repository
Make a change and commit it within the submodule
Make a change and DON'T commit it within the submodule
Back out of the submodule, and press "spacebar" on the submodule to stage the committed changes.
Press "spacebar" again on the submodule, and the submodule's changes will not be unstaged.
Expected behavior
When there are unstaged changes within the submodule that cannot be staged due to those changes themselves not being staged within the submodule, pressing spacebar should unstage the current change to the submodule's commit hash.
Spacebar should call git reset $SUBMODULE_NAME instead of git add $SUBMODULE_NAME
Screenshots
Submodule has modified content that has not yet been committed to the submodule, as well as changes that have been committed to the submodule.
When attempting to unstage this with a "spacebar" keypress, lazygit will attempt to stage the uncommitted changes in the submodule despite it not having a commit.
After this doesn't work, lazygit will reset to the first screenshot showing that the submodule contains modified content.
Version info:
commit=, build date=, build source=unknown, version=unversioned, os=windows, arch=amd64, git version=2.45.1.windows.1
git version 2.45.1.windows.1
Additional context
Version info as of writing seems to be broken on my machine, likely as I've installed lazygit through go install on windows through MSYS2 specific go.
The build I'm using is v0.42.1, but I've had this issue ever since I've been using lazygit.
I'll likely put in a pull request for this issue myself at some point as it doesn't seem too hard to solve.
The text was updated successfully, but these errors were encountered:
No trouble recreating the issue. Still working on the actual fix. Will most likely share what I have at this stage for some guidance if no more progress is made soon.
Describe the bug
As described above, when attempting to unstage a submodule's changes with spacebar after staging said changes, instead of unstaging the currently staged changes within the submodule it quickly moves the changes from "staged" to "unstaged" and back again. This behaviour only occurs when the submodule has uncommitted changes within itself.
To Reproduce
Expected behavior
When there are unstaged changes within the submodule that cannot be staged due to those changes themselves not being staged within the submodule, pressing spacebar should unstage the current change to the submodule's commit hash.
Spacebar should call
git reset $SUBMODULE_NAME
instead ofgit add $SUBMODULE_NAME
Screenshots
![Screenshot 2024-06-06 161136](https://private-user-images.githubusercontent.com/83956910/337326782-bd6ffc67-0d51-48d4-aeb4-1d227ac2444c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NTY2ODEsIm5iZiI6MTcxOTc1NjM4MSwicGF0aCI6Ii84Mzk1NjkxMC8zMzczMjY3ODItYmQ2ZmZjNjctMGQ1MS00OGQ0LWFlYjQtMWQyMjdhYzI0NDRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE0MDYyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQxMTI1M2Y4M2JjZmJiNThmMzJmYzY1MDdjMzI3YTdhZjI1ZTJjZDQxZTM5MjRiZDliYTAwZDVlOGMyYjE5MjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Dwu5NLn4VQO9MDCfkFdrVhPxuZWFflaZJcke_wvFmZk)
![Screenshot (2)](https://private-user-images.githubusercontent.com/83956910/337327920-ff27f749-f148-4bef-b473-44e7c49dead1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NTY2ODEsIm5iZiI6MTcxOTc1NjM4MSwicGF0aCI6Ii84Mzk1NjkxMC8zMzczMjc5MjAtZmYyN2Y3NDktZjE0OC00YmVmLWI0NzMtNDRlN2M0OWRlYWQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE0MDYyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBhNDk3M2E1ZTY4YTYyOThkMTE4MGM0MTEzMTJhZGIwMzZkNjlkMDUxNTU2NTYyZGM0YWFiZWUxYzM2ZWIwYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WOhaQC6UF_AyzRPNz61wsBBknEKSNym13UXs-Q4c6c8)
Submodule has modified content that has not yet been committed to the submodule, as well as changes that have been committed to the submodule.
When attempting to unstage this with a "spacebar" keypress, lazygit will attempt to stage the uncommitted changes in the submodule despite it not having a commit.
After this doesn't work, lazygit will reset to the first screenshot showing that the submodule contains modified content.
Version info:
commit=, build date=, build source=unknown, version=unversioned, os=windows, arch=amd64, git version=2.45.1.windows.1
git version 2.45.1.windows.1
Additional context
Version info as of writing seems to be broken on my machine, likely as I've installed lazygit through go install on windows through MSYS2 specific go.
The build I'm using is v0.42.1, but I've had this issue ever since I've been using lazygit.
I'll likely put in a pull request for this issue myself at some point as it doesn't seem too hard to solve.
The text was updated successfully, but these errors were encountered: