Open ioreshnikov opened 1 week ago
There's an "auto_show_console" config option - try setting it to false. I suspect whats going on is the popup is stealing focus, but the status buffer needs focus to refresh correctly.
I tried it and sadly it doesn't seem to help. The console is not being shown, but the behaviour is the same – once the refresh is over the status buffer is closed with an error.
After inspecting the logs I've noticed that the Registered repository for:
is logged twice. Not sure if it's important. But in case it's relevant, a bit of extra info on the repository set up -- it's a monorepo with one common .git
folder at the root of the project and multiple individual services. Each service is a separate typescript package, but there's no .git
folder in any of them.
Also I am attaching the log file neogit.log
I checked out the linux kernel and got a good reproduction, so I'll use that as a performance benchmark and see what I can do :)
Figured out two things:
auto_show_console = false
in neogit config fixes this. I'll do a proper fix for this too.git log
performance with --topo-order
flag set, which is used behind the scenes. Try running git commit-graph write
to pre-compute the commit graph, and check out the other steps here: https://github.com/jesseduffield/lazygit/issues/2875#issuecomment-1962138285with those two things done, I can load the status buffer for the linux repo in about 2~3 seconds.
Also check out https://git-scm.com/docs/git-maintenance to automate this :)
Description
Hey!
I am working on a giant monorepo and the status buffer is sadly not usable. So far I have noticed several issues:
When I open the status buffer in the new tab, the refresh process is triggered. On my repo it's a longer one, so a popup is shown. As soon as all the commands are run in the popup, it is closed automatically, but this also immediately closes the status buffer
Often this it shows an error message
Invalid buffer id: X
. Sometimes the error message isBuffer X does not exist
This never happens on a smaller projects
I will be happy to help you with figuring this out and can provide the logs if necessary
Thanks in advance!
Neovim version
NVIM v0.10.1 Build type: Release LuaJIT 2.1.1724512491
Operating system and version
macOS 14.2.1
Steps to reproduce
One obvious way is to clone a giant repo, for instance the Linux kernel, and try to open the status buffer in a new tab there.
I suspect there's a way to trigger the same behaviour in any repository by artificially inserting a timeout when running the git commands, but I am not familiar with neogit's source code enough to suggest the change
Expected behavior
Status buffer being slow, but usable
Actual behavior
Status buffer closing with an error message immediately after the refresh
Minimal config