Describe the bug
When I start lazygit outside of any git repository, it immediately starts consuming very high CPU (often 400%+) and keeps increasing RAM usage significantly.
cd into a folder that is not a git repository.
Run lazygit
Observe high CPU usage (400%+) and steadily rising memory usage.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Lazygit should either:
Show a clean error message like "must be run in a work tree", or
Gracefully skip / handle bare repos in the switch path.
Screenshots
Version info:
lazygit --version
###version=0.62.2
commit=v0.62.2,
build date=2026-06-04T09:11:05Z,
build source=binaryRelease,
version=0.62.2,
os=linux [ Arch Linux ( profile -> Minimal ) ],
arch=amd64,
git version=2.54.0
Terminal info:
DWM -> ST terminal
Describe the bug
When I start lazygit outside of any git repository, it immediately starts consuming very high CPU (often 400%+) and keeps increasing RAM usage significantly.
cd into a folder that is not a git repository.
Run lazygit
Observe high CPU usage (400%+) and steadily rising memory usage.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Lazygit should either:
Show a clean error message like "must be run in a work tree", or
Gracefully skip / handle bare repos in the switch path.
Screenshots
Version info:
lazygit --version
###version=0.62.2
commit=v0.62.2,
build date=2026-06-04T09:11:05Z,
build source=binaryRelease,
version=0.62.2,
os=linux [ Arch Linux ( profile -> Minimal ) ],
arch=amd64,
git version=2.54.0
Terminal info:
DWM -> ST terminal