Open sankarraj-ps opened 2 months ago
Btw, This tool is one of the best I have ever used for my development purposes.
Kudos and Thanks to everyone involved 🥇 ❤️
Is one of those repositories a public one?
Is one of those repositories a public one?
nope, they are private
I'm experiencing this same issue after updating from 0.40.0
to 0.44.0
@bbuff27 Are you seeing this in a repo that you can share?
Unfortunately, no I can't share the repo as it's a private business repo. Your comment did push me to check some other repos and they were working okay. Do you have any suggestions on how to troubleshoot myself?
I'm also seeing this, on all my private GitHub Repositories. It doesn't happen on public ones (e.g. I can clone the code for lazygit itself, and lazygit works fine in that repository).
I ran lazygit --debug
and can see that I get an error when this bug happens, that doesn't appear on the public repositories:
Sep 13 10:38:29 |ERRO| 20:7: empty subsection name
And here's a full set of logs from launch, up to the error appearing (paths redacted):
Sep 13 10:43:22 |INFO| starting main loop
Sep 13 10:43:22 |INFO| Updating is currently not supported for windows until we can fix permission issues
Sep 13 10:43:22 |INFO| refreshing all scopes in async mode
Sep 13 10:43:22 |INFO| Refresh took 0s
Sep 13 10:43:22 |DEBU| RunCommand command="cmd /c title <redacted:repo name> - Lazygit"
Sep 13 10:43:22 |DEBU| RunCommand command="git fetch --all --no-write-fetch-head"
Sep 13 10:43:22 |DEBU| RunCommand command="git stash list -z --pretty=%ct|%gs"
Sep 13 10:43:22 |DEBU| RunCommand command="git rev-parse --abbrev-ref --verify HEAD"
Sep 13 10:43:22 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads"
Sep 13 10:43:22 |DEBU| RunCommand command="git tag --list -n --sort=-creatordate"
Sep 13 10:43:22 |DEBU| RunCommand command="git merge-base HEAD refs/remotes/origin/main"
Sep 13 10:43:22 |INFO| git merge-base HEAD refs/remotes/origin/main (69.0255ms)
Sep 13 10:43:22 |DEBU| using cache for key rebase.updateRefs
Sep 13 10:43:22 |INFO| postRefreshUpdate for commits took 1.0602ms
Sep 13 10:43:22 |DEBU| using cache for key rebase.updateRefs
Sep 13 10:43:22 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads"
Sep 13 10:43:22 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (70.9617ms)
Sep 13 10:43:22 |ERRO| 20:7: empty subsection name
@rbrunt Thanks for investigating.
It looks like there's a syntax error in your repo's local .git/config
file (at line 20), my guess is that it contains something like [remote ""]
or [branch ""]
there.
I can reproduce the problem on my end if I add such an entry to mine. I'll have a look if there's anything we can do on our side to handle this more gracefully.
@stefanhaller great spot: I can confirm that there is. Looking at my problematic repos, it's because there's an entry like the following:
[snyk ""]
baseBranch =
Removing this from .git/config
fixes the issue in lazygit.
I suspect this is being added by the synk VSCode plugin, but need to confirm that....
If there's a way to handle this more gracefully in lazygit, that would be great (other clients don't seem to be affected), but I'll see if I can raise this with Synk too...
@stefanhaller To confirm, after finding the same in my .git/config
as @rbrunt, I also resolved the problem by removing those lines.
Describe the bug In some repositories, the local branch panel appears empty while all branches are visible in the CLI.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Local Branches
panel should contain list branches from localScreenshots If applicable, add screenshots to help explain your problem.
Version info: commit=71ad3fac63a3ef3326021837b49e9497d332818b, build date=2024-07-13T10:24:19Z, build source=binaryRelease, version=0.43.1, os=darwin, arch=amd64, git version=2.39.3 (Apple Git-146)
git version 2.39.3 (Apple Git-146)
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.