Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error "expected section name" #3513

Closed
lobneroO opened this issue Apr 22, 2024 · 3 comments
Closed

error "expected section name" #3513

lobneroO opened this issue Apr 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lobneroO
Copy link

lobneroO commented Apr 22, 2024

Describe the bug
When opening a specific repository with lazygit in powershell, lazygit opens with an error

52:3: expected section name

Then, in Git-Bash the TUI quickly disappears and is replaced by characters running through on the right side. In powershell it slowly builds up the commits section (while the error is displayed) and then there, too, the TUI is replaced by the character run through (in the second video in powershell, this starts at ~1:47):

Git-Bas:
https://github.com/jesseduffield/lazygit/assets/17877050/666e1b4b-445e-4b90-93d3-61d7f35f5f9d

Powershell:
https://github.com/jesseduffield/lazygit/assets/17877050/36081d5e-4aa7-464a-952f-2d9356c2f084

At this point, I have to kill the console tab, because neither ctrl+c nor q close this.

I'm pretty sure this repository had worked before and it certainly works on a different PC. On this PC it is installed via chocolatey, on the one where it is working right now it was installed via winget. It is up to date on the error one (at least choco upgrade said it was).

I tried a different repository, that one works on both PCs. Neither repo is open source though, sorry.

To Reproduce
Steps to reproduce the behavior:

  1. open lazygit in an affected repository...

Expected behavior
No errors appear, TUI stays open

Screenshots
If applicable, add screenshots to help explain your problem.

Version info:
Run lazygit --version and paste the result here

lazygit --version
commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=windows, arch=amd64, git version=2.44.0.windows.1

Run git --version and paste the result here

git version 2.44.0.windows.1

on the second PC on which it does not crash:
Run lazygit --version and paste the result here

commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=windows, arch=amd64, git version=2.41.0.windows.1

Run git --version and paste the result here

git version 2.41.0.windows.1

Additional context
Windows 11
Windows Terminal
Powershell + Git-Bash

Debug/Logs

I tried the suggested lazygit --debug / --logs combo. The logs did not change. The output I got was:

Apr 22 15:19:01 |INFO| refreshing all scopes in async mode
Apr 22 15:19:01 |INFO| Refresh took 0s
Apr 22 15:19:01 |ERRO| ignoring create popup panel because a popup panel is already open
Apr 22 15:19:01 |DEBU| RunCommand command="git stash list -z --pretty=%ct|%gs"
Apr 22 15:19:01 |INFO| refreshing all scopes in async mode
Apr 22 15:19:01 |INFO| Refresh took 0s
Apr 22 15:19:01 |ERRO| ignoring create popup panel because a popup panel is already open
Apr 22 15:19:01 |INFO| refreshing all scopes in async mode
Apr 22 15:19:01 |INFO| Refresh took 0s
Apr 22 15:19:01 |ERRO| ignoring create popup panel because a popup panel is already open

@lobneroO lobneroO added the bug Something isn't working label Apr 22, 2024
@stefanhaller
Copy link
Collaborator

I suspect there's something wrong with this repo's .git/config file, probably at line 52. Have a look if there's any junk in there.

I'm only guessing here though, couldn't reproduce the problem on my end, at least not with the symptoms you saw.

@lobneroO
Copy link
Author

Yes, that seems to have been the problem. There was a junk entry there:

[ ""]
	local = user.email

For me this solved now. If you consider it done, feel free to close, but I'll leave it open if you want to add a fix for it in lazygit.
Thank you.

@stefanhaller
Copy link
Collaborator

On master it no longer misbehaves in the way you described, because of this commit. However, now you get no indication whatsoever that there's something wrong (unless you have logging enabled and look at the debug log), so that's also not good. I'd say that's a separate issue though, so I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants