Closed LarssonMartin1998 closed 1 month ago
I think I am having a similar issue here - that only happens on one of my repo as well.
I had a look on the code based on my error and I think the issue is coming from the name of the repository open. Mine had a "%" symbol on it and after renaming the folder I was able to open Neogit without an issue.
Can you maybe try renaming it @LarssonMartin1998 ?
I'd be very curious if that's the issue, or if there's something else going on here.
I think I am having the same issue here - that only happens on one of my repo as well.
I had a look on the code and I think the issue is coming from the name of the repository/folder open. Mine had a "%" symbol on it and after renaming the folder I was able to open Neogit without an issue.
Can you maybe try renaming it @LarssonMartin1998 ?
I just tried renaming it and it didn't have an effect.
This was the original path to the root: /Users/martin.larsson/Projs/Repos/NameOfProject I also tried: /Users/martin.larsson/Projs/Repos/nop with the same issue.
This is an enterprise repo so I changed the name of the repo in this comment but it has the exact same spacing and capitalization.
Since this is an enterprise repo, it is on my work computer which has crowdstrike on it and the path is setup in CS to ignore some checks as to not impede our development (otherwise it drastically slows git and other things down). At first I thought that had something to do with it, but I moved the entire thing to ~/dev/git/nop and I still got the same issue
Alright, could you grab some logs for me?
NEOGIT_LOG_LEVEL="debug" NEOGIT_LOG_FILE="true" NEOGIT_DEBUG=true nvim
the logfile probably lives at ~/.cache/nvim/neogit.log
Alright, could you grab some logs for me?
NEOGIT_LOG_LEVEL="debug" NEOGIT_LOG_FILE="true" NEOGIT_DEBUG=true nvim
the logfile probably lives at
~/.cache/nvim/neogit.log
Absolutely, here is the log:
[D 9.50.131] lib/state.lua:10 [STATE]: Reading file: '/Users/martin.larsson/.local/state/nvim/neogit/%Users%martin.larsson%Dev%git%nop'
[D 9.50.131] lib/state.lua:10 [STATE]: Loaded: '/Users/martin.larsson/.local/state/nvim/neogit/%Users%martin.larsson%Dev%git%nop'
[D 9.54.988] lib/git/repository.lua:188 [REPO]: Registered Repository for: /Users/martin.larsson/Dev/git/nop
[D 9.54.988] lib/git/repository.lua:200 [REPO]: Initializing Repository
[D 9.55.015] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "status", "--porcelain=2", "-b" }
[D 9.55.016] lib/git/repository.lua:235 [REPO]: Refreshed update_rebase_status in 0 ms
[D 9.55.017] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "log", "--format=ref_name%x1D%D%x1Fparent%x1D%P%x1Frel_date%x1D%cr%x1Fcommitter_date%x1D%cD%x1Fsanitized_subject_line%x1D%f%x1Fcommitter_name%x1D%cN%x1Ftree%x1D%T%x1Fcommit_notes%x1D%N%x1Fauthor_email%x1D%aE%x1Fabbreviated_parent%x1D%p%x1Fabbreviated_tree%x1D%t%x1Fsubject%x1D%s%x1Fabbreviated_commit%x1D%h%x1Fbody%x1D%b%x1Foid%x1D%H%x1Fcommitter_email%x1D%cE%x1Fauthor_date%x1D%aD%x1Fauthor_name%x1D%aN%x1Fencoding%x1D%e%x1E", "--no-patch", "--max-count=10" }
[D 9.55.018] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "rev-parse", "HEAD" }
[D 9.55.019] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "describe", "--long", "--tags", "HEAD" }
[D 9.55.019] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "status", "--porcelain=2", "-b" }
[D 9.55.020] lib/git/repository.lua:235 [REPO]: Refreshed update_bisect_information in 0 ms
[D 9.55.020] lib/git/repository.lua:235 [REPO]: Refreshed update_merge_status in 0 ms
[D 9.55.020] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "stash", "list" }
[D 9.55.020] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "status", "--porcelain=2", "-b" }
[D 9.55.021] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "status", "-z", "--porcelain=2" }
[D 9.55.021] buffers/status/init.lua:30 [STATUS] Registering instance for: /Users/martin.larsson/Dev/git/nop
[D 9.55.025] lib/buffer.lua:584 [BUFFER:8] Showing buffer in window 1006
[D 9.55.025] lib/buffer.lua:587 [BUFFER:8] Setting buffer options
[D 9.55.025] lib/buffer.lua:599 [BUFFER:8] Setting filetype: NeogitStatus
[D 9.55.029] lib/buffer.lua:604 [BUFFER:8] Building user key-mappings
[D 9.55.030] lib/buffer.lua:613 [BUFFER:8] Setting key-mappings
[D 9.55.030] lib/buffer.lua:634 [BUFFER:8] Initializing buffer
[D 9.55.031] lib/buffer.lua:639 [BUFFER:8] Setting window options
[D 9.55.031] lib/buffer.lua:663 [BUFFER:8] Rendering buffer
[D 9.55.032] lib/buffer.lua:668 [BUFFER:8] Setting autocmd for: FocusGained
[D 9.55.032] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitRebase
[D 9.55.032] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitFetchComplete
[D 9.55.033] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitPullComplete
[D 9.55.033] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitPushComplete
[D 9.55.033] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitStash
[D 9.55.033] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitReset
[D 9.55.033] lib/buffer.lua:677 [BUFFER:8] Setting user autocmd for: NeogitMerge
[D 9.55.033] lib/buffer.lua:695 [BUFFER:8] Running config.after callback
[D 9.55.033] watcher.lua:72 [WATCHER] Watching git dir: /Users/martin.larsson/Dev/git/nop/.git
[D 9.55.033] lib/buffer.lua:702 [BUFFER:8] Setting up on_detach callback
[D 9.55.033] lib/buffer.lua:712 [BUFFER:8] Setting up context highlighting
[D 9.55.033] lib/buffer.lua:753 [BUFFER:8] Setting up foldmarkers
[D 9.55.033] lib/buffer.lua:794 [BUFFER:8] Setting CWD to: /Users/martin.larsson/Dev/git/nop
[D 9.55.033] buffers/status/init.lua:261 [STATUS] Beginning refresh from UNKNOWN
[D 9.55.034] lib/git/repository.lua:243 [REPO] Callback registered
[D 9.55.034] lib/git/repository.lua:266 [REPO] Already running - abort
[D 9.55.075] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "log", "--format=ref_name%x1D%D%x1Fparent%x1D%P%x1Frel_date%x1D%cr%x1Fcommitter_date%x1D%cD%x1Fsanitized_subject_line%x1D%f%x1Fcommitter_name%x1D%cN%x1Ftree%x1D%T%x1Fcommit_notes%x1D%N%x1Fauthor_email%x1D%aE%x1Fabbreviated_parent%x1D%p%x1Fabbreviated_tree%x1D%t%x1Fsubject%x1D%s%x1Fabbreviated_commit%x1D%h%x1Fbody%x1D%b%x1Foid%x1D%H%x1Fcommitter_email%x1D%cE%x1Fauthor_date%x1D%aD%x1Fauthor_name%x1D%aN%x1Fencoding%x1D%e%x1E", "--no-patch", "HEAD", "--max-count=1", "--topo-order" }
[D 9.55.099] lib/git/repository.lua:235 [REPO]: Refreshed update_stashes in 79 ms
[D 9.55.371] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "remote" }
[D 9.55.390] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "rev-parse", "release/6.48.2" }
[D 9.55.393] lib/git/repository.lua:235 [REPO]: Refreshed update_recent in 376 ms
[D 9.55.406] lib/git/repository.lua:235 [REPO]: Refreshed update_tags in 388 ms
[D 9.55.880] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "log", "--format=%x1E%H%x00", "--graph", "--color", "HEAD", "--max-count=1", "--topo-order" }
[D 9.56.418] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "log", "--max-count=1", "--format=%s", "5d0c0ebacf5cd237e598f50261b45212ea5171ee" }
[D 9.56.433] lib/git/repository.lua:235 [REPO]: Refreshed update_sequencer_status in 1415 ms
[D 9.57.016] lib/buffer.lua:587 [BUFFER:9] Setting buffer options
[D 9.57.016] lib/buffer.lua:599 [BUFFER:9] Setting filetype: NeogitConsole
[D 9.57.020] lib/buffer.lua:613 [BUFFER:9] Setting key-mappings
[D 9.57.020] lib/buffer.lua:668 [BUFFER:9] Setting autocmd for: WinLeave
[D 9.57.020] lib/buffer.lua:702 [BUFFER:9] Setting up on_detach callback
[D 9.57.024] lib/buffer.lua:587 [BUFFER:9] Setting buffer options
[D 9.57.025] lib/buffer.lua:599 [BUFFER:9] Setting filetype: NeogitConsole
[D 9.57.028] lib/buffer.lua:613 [BUFFER:9] Setting key-mappings
[D 9.57.028] lib/buffer.lua:668 [BUFFER:9] Setting autocmd for: WinLeave
[D 9.57.028] lib/buffer.lua:702 [BUFFER:9] Setting up on_detach callback
[D 9.57.028] lib/buffer.lua:587 [BUFFER:9] Setting buffer options
[D 9.57.028] lib/buffer.lua:599 [BUFFER:9] Setting filetype: NeogitConsole
[D 9.57.031] lib/buffer.lua:613 [BUFFER:9] Setting key-mappings
[D 9.57.031] lib/buffer.lua:668 [BUFFER:9] Setting autocmd for: WinLeave
[D 9.57.031] lib/buffer.lua:702 [BUFFER:9] Setting up on_detach callback
[D 9.57.032] lib/buffer.lua:587 [BUFFER:9] Setting buffer options
[D 9.57.032] lib/buffer.lua:599 [BUFFER:9] Setting filetype: NeogitConsole
[D 9.57.034] lib/buffer.lua:613 [BUFFER:9] Setting key-mappings
[D 9.57.034] lib/buffer.lua:668 [BUFFER:9] Setting autocmd for: WinLeave
[D 9.57.034] lib/buffer.lua:702 [BUFFER:9] Setting up on_detach callback
[D 9.57.904] lib/buffer.lua:688 [BUFFER:8] Clearing autocmd group
[D 9.57.904] lib/buffer.lua:705 [BUFFER:8] Running on_detach
[D 9.57.904] watcher.lua:84 [WATCHER] Stopped watching git dir: /Users/martin.larsson/Dev/git/nop/.git
[D 9.79.708] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "branch", "--show-current" }
[D 9.79.710] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "rev-parse", "--short", "5d0c0ebacf5cd237e598f50261b45212ea5171ee" }
[D 9.79.712] lib/git/repository.lua:235 [REPO]: Refreshed update_status in 24690 ms
[D 9.79.712] lib/git/config.lua:102 [Config] Rebuilding git config_cache
[D 9.79.713] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "config", "--list", "--null", "--local" }
[D 9.79.722] lib/git/cli.lua:1056 Running command async failed - awaiting instead
[D 9.79.733] lib/git/repository.lua:235 [REPO]: Refreshed update_unpulled in 24714 ms
[D 9.79.734] lib/git/repository.lua:235 [REPO]: Refreshed update_unmerged in 24713 ms
[D 9.79.734] lib/git/cli.lua:1053 Running command async: { "git", "--no-pager", "--literal-pathspecs", "--no-optional-locks", "-c", "core.preloadindex=true", "-c", "color.ui=always", "log", "--max-count=1", "--format=%s", "5d0c0ebacf5cd237e598f50261b45212ea5171ee" }
[D 9.79.746] lib/git/repository.lua:235 [REPO]: Refreshed update_branch_information in 24731 ms
[D 9.79.746] lib/git/repository.lua:287 [REPO]: Refreshes complete in 24731 ms
[D 9.79.746] lib/git/repository.lua:249 [REPO]: Running refresh callback (1)
[D 9.79.746] buffers/status/init.lua:288 [STATUS] Rendering UI
I pushed some changes - could you pull the latest master and see if the issue persists, and if so.... more logs :)
I pushed some changes - could you pull the latest master and see if the issue persists, and if so.... more logs :)
Hey, updated to latest and unfortunately the issue still persists, error log:
Error executing vim.schedule lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(buffer):E86: Buffer 12 does not exist
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...on/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:606: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Error executing vim.schedule lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(buffer):E86: Buffer 12 does not exist
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...on/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:606: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Error executing vim.schedule lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(buffer):E86: Buffer 12 does not exist
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...on/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:606: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Error executing vim.schedule lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(buffer):E86: Buffer 12 does not exist
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...on/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:606: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Error executing vim.schedule lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(buffer):E86: Buffer 12 does not exist
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...on/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:606: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Error executing vim.schedule lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(buffer):E86: Buffer 12 does not exist
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
...on/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:606: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:372: Invalid buffer id: 12
stack traceback:
[C]: in function 'error'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'step'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:48: in function 'execute'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:118: in function 'callback'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:25: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'saved_callback'
...are/nvim/lazy/plenary.nvim/lua/plenary/async/control.lua:126: in function 'tx'
.../share/nvim/lazy/plenary.nvim/lua/plenary/async/util.lua:71: in function 'callback'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:25: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'cb'
...son/.local/share/nvim/lazy/neogit/lua/neogit/process.lua:303: in function <...son/.local/share/nvim/lazy/neogit/lua/neogit/process.lua:268>
Neogit log:
[D 8.91.618] lib/state.lua:10 [STATE]: Reading file: '/Users/martin.larsson/.local/state/nvim/neogit/%Users%martin.larsson%dev%git%nop'
[D 8.91.619] lib/state.lua:10 [STATE]: Loaded: '/Users/martin.larsson/.local/state/nvim/neogit/%Users%martin.larsson%dev%git%nop'
[D 8.96.535] lib/git/repository.lua:191 [REPO]: Registered Repository for: /Users/martin.larsson/dev/git/nop
[D 8.96.535] lib/git/repository.lua:203 [REPO]: Initializing Repository
[D 8.96.564] lib/git/repository.lua:240 [REPO]: Refreshed update_bisect_information in 0 ms
[D 8.96.569] lib/git/repository.lua:240 [REPO]: Refreshed update_rebase_status in 0 ms
[D 8.96.570] lib/git/repository.lua:240 [REPO]: Refreshed update_merge_status in 0 ms
[D 8.96.571] buffers/status/init.lua:30 [STATUS] Registering instance for: /Users/martin.larsson/dev/git/nop
[D 8.96.590] lib/buffer.lua:593 [BUFFER:12] Showing buffer in window 1009
[D 8.96.590] lib/buffer.lua:596 [BUFFER:12] Setting buffer options
[D 8.96.590] lib/buffer.lua:608 [BUFFER:12] Setting filetype: NeogitStatus
[D 8.96.600] lib/buffer.lua:613 [BUFFER:12] Building user key-mappings
[D 8.96.600] lib/buffer.lua:622 [BUFFER:12] Setting key-mappings
[D 8.96.601] lib/buffer.lua:643 [BUFFER:12] Initializing buffer
[D 8.96.601] lib/buffer.lua:648 [BUFFER:12] Setting window options
[D 8.96.602] lib/buffer.lua:672 [BUFFER:12] Rendering buffer
[D 8.96.626] lib/buffer.lua:677 [BUFFER:12] Setting autocmd for: FocusGained
[D 8.96.626] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitPushComplete
[D 8.96.626] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitStash
[D 8.96.626] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitReset
[D 8.96.626] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitMerge
[D 8.96.627] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitRebase
[D 8.96.627] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitFetchComplete
[D 8.96.627] lib/buffer.lua:686 [BUFFER:12] Setting user autocmd for: NeogitPullComplete
[D 8.96.627] lib/buffer.lua:704 [BUFFER:12] Running config.after callback
[D 8.96.627] watcher.lua:53 [WATCHER] Registered buffer StatusBuffer
[D 8.96.627] watcher.lua:86 [WATCHER] Watching git dir: /Users/martin.larsson/dev/git/nop/.git
[D 8.96.627] lib/buffer.lua:711 [BUFFER:12] Setting up on_detach callback
[D 8.96.658] lib/buffer.lua:721 [BUFFER:12] Setting up context highlighting
[D 8.96.658] lib/buffer.lua:762 [BUFFER:12] Setting up foldmarkers
[D 8.96.658] lib/buffer.lua:803 [BUFFER:12] Setting CWD to: /Users/martin.larsson/dev/git/nop
[D 8.96.658] buffers/status/init.lua:269 [STATUS] Beginning refresh from UNKNOWN
[D 8.96.664] lib/git/repository.lua:248 [REPO] Callback registered from status
[D 8.96.664] lib/git/repository.lua:303 [REPO] (279896664) Already running - setting interrupt for 279896560
[D 8.96.705] lib/git/repository.lua:240 [REPO]: Refreshed update_bisect_information in 0 ms
[D 8.96.724] lib/git/repository.lua:240 [REPO]: Refreshed update_rebase_status in 0 ms
[D 8.96.729] lib/git/repository.lua:240 [REPO]: Refreshed update_merge_status in 0 ms
[D 8.97.094] lib/git/repository.lua:240 [REPO]: Refreshed update_stashes in 524 ms
[D 8.97.099] lib/git/repository.lua:240 [REPO]: Refreshed update_stashes in 375 ms
[D 8.97.205] lib/git/repository.lua:240 [REPO]: Refreshed update_recent in 643 ms
[D 8.97.213] lib/git/repository.lua:240 [REPO]: Refreshed update_recent in 545 ms
[D 8.97.233] lib/git/repository.lua:240 [REPO]: Refreshed update_tags in 508 ms
[D 8.97.251] lib/git/repository.lua:240 [REPO]: Refreshed update_tags in 682 ms
[D 8.98.562] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.562] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.572] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.572] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.572] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.583] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.583] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.590] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.590] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.590] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.590] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.591] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.598] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.599] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.599] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.600] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.600] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.616] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.616] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.616] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.668] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.669] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.675] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.675] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.675] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.780] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.781] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.786] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.786] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.786] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.786] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.787] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.792] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.792] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.792] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.792] lib/buffer.lua:596 [BUFFER:13] Setting buffer options
[D 8.98.792] lib/buffer.lua:608 [BUFFER:13] Setting filetype: NeogitConsole
[D 8.98.797] lib/buffer.lua:622 [BUFFER:13] Setting key-mappings
[D 8.98.797] lib/buffer.lua:677 [BUFFER:13] Setting autocmd for: WinLeave
[D 8.98.797] lib/buffer.lua:711 [BUFFER:13] Setting up on_detach callback
[D 8.98.991] lib/git/repository.lua:240 [REPO]: Refreshed update_sequencer_status in 2424 ms
[D 8.98.994] lib/git/repository.lua:240 [REPO]: Refreshed update_sequencer_status in 2279 ms
[D 8.99.770] lib/git/repository.lua:240 [REPO]: Refreshed update_status in 3064 ms
[D 8.99.773] lib/git/repository.lua:240 [REPO]: Refreshed update_status in 3209 ms
[D 8.99.778] lib/buffer.lua:697 [BUFFER:12] Clearing autocmd group
[D 8.99.778] lib/buffer.lua:714 [BUFFER:12] Running on_detach
[D 8.99.779] watcher.lua:66 [WATCHER] Unregistered buffer StatusBuffer
[D 8.99.779] watcher.lua:69 [WATCHER] No registered buffers - stopping
[D 8.99.779] watcher.lua:102 [WATCHER] Stopped watching git dir: /Users/martin.larsson/dev/git/nop/.git
[D 8.99.936] lib/git/config.lua:102 [Config] Rebuilding git config_cache
[D 8.99.951] lib/git/repository.lua:240 [REPO]: Refreshed update_unpulled in 3287 ms
[D 8.99.965] lib/git/repository.lua:240 [REPO]: Refreshed update_unmerged in 3395 ms
[D 8.99.981] lib/git/repository.lua:240 [REPO]: Refreshed update_unmerged in 3251 ms
[D 8.99.996] lib/git/repository.lua:240 [REPO]: Refreshed update_unpulled in 3436 ms
[D 9.00.027] lib/git/repository.lua:240 [REPO]: Refreshed update_branch_information in 3321 ms
[D 9.00.027] lib/git/repository.lua:325 [REPO]: (279896664) Refreshes complete in 3363 ms
[D 9.00.027] lib/git/repository.lua:254 [REPO]: (279896664) Running callback for status
[D 9.00.027] buffers/status/init.lua:298 [STATUS] Rendering UI
[D 9.00.051] lib/git/repository.lua:240 [REPO]: Refreshed update_branch_information in 3487 ms
[D 9.00.051] lib/git/repository.lua:321 [REPO]: (279896560) Interrupting on_complete callback
So this is more of a hack than a fix, but I think if you set auto_show_console = false
in your neogit setup, it might resolve it. I'd still like to try to figure out why this is happening, but it might fix things for you
That works! I have some more findings from disabling that though. When I open Neogit, I get notifications in nvim-notify saying:
Neogit: Command "git status --porcelain=2 -b" running for more than: 2.0
Open the command history for details
I should've mentioned in my issue post initally that my git is very slow due to crowdstrike. A regular git status takes ~2.5seconds. That might have something to do with it, and the reason it might fail in this project but not others is maybe because of the size of the repo.
Thanks for your help on this. I really appreciate it. Do you want me to close the issue with this workaround, or should I keep it open?
So this is more of a hack than a fix, but I think if you set
auto_show_console = false
in your neogit setup, it might resolve it. I'd still like to try to figure out why this is happening, but it might fix things for you
CKolkey, thanks for finding the setting to fix this. I have been having this issue for months, whenever the console opens it throws an error. I thought the console was opening because of the error, not the error being caused by the console.
Ah, thats super annoying, sorry. It's been on my radar to fix, but my wife is about 8 months pregnant right now, so I haven't had tons of free time. But I kinda know whats up.
Alright, faster than I thought. The console should no longer open for "hidden" commands running, which was the issue.
Give it a try and lemme know if I can close this issue :)
Alright, faster than I thought. The console should no longer open for "hidden" commands running, which was the issue.
Give it a try and lemme know if I can close this issue :)
Haha that's funny, I was trying to show a coworker the issue at hand but I couldn't reproduce it. I frequently update my plugins so I had probably pulled your changes that fixed it before I saw the email notification about it. Either way, YES, it works! I am no longer able to reproduce the error no matter if I'm running with the auto_show_console true/false.
Lastly, thanks a lot for looking into this, I really appreciate it, and good luck with the baby to both you and your wife. Enjoy!
@CKolkey, I can verify that I no longer see the issue with the console popping up and causing errors, when auto_show_console = false. When it's true, it behaves weirdly, but that config might go away.
Moreover, messages from the console look really nice now!
Thanks for making this plugin and best wishes for you and your family!
I'm also having an issue in a specific repo, even after adding the config option mentioned above. When I run require("neogit").open()
I get this error:
E5108: Error executing lua: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/plenary.nvim/lua/
plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...ocal/share/nvim/lazy/neogit/lua/neogit/lib/git/hooks.lua:57: attempt to index a nil value
stack traceback:
[C]: in function 'error'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'step'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:48: in function 'execute'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:118: in function 'dispatch_refresh'
.../dom.batten/.local/share/nvim/lazy/neogit/lua/neogit.lua:114: in function 'open_status_buffer'
.../dom.batten/.local/share/nvim/lazy/neogit/lua/neogit.lua:178: in function 'open'
/home/.config/nvim/lua/plugins/neogit.lua:26: in function </home/.config/nvim/lua/plugins/neogit.lua:22>
if I close the error, run neogit.open()
again, I get the same error but when I close the error then the console pops open, albeit without any changes picked up. The logs look like this:
[D 7.33.669] lib/state.lua:10 [STATE]: Reading file: '/home/.local/state/nvim/neogit/%Users%dom.batten%path%to%repo'
[D 7.33.670] lib/state.lua:10 [STATE]: Loaded: '/home/.local/state/nvim/neogit/%Users%dom.batten%path%to%repo'
[D 7.33.691] lib/git/repository.lua:191 [REPO]: Registered Repository for: /home/path/to/repo
[D 7.33.691] lib/git/repository.lua:203 [REPO]: Initializing Repository
[D 7.33.701] lib/git/repository.lua:240 [REPO]: Refreshed update_rebase_status in 0 ms
[D 7.34.596] lib/git/repository.lua:240 [REPO]: Refreshed update_status in 894 ms
[D 7.34.614] lib/git/config.lua:102 [Config] Rebuilding git config_cache
[D 7.34.656] lib/git/repository.lua:240 [REPO]: Refreshed update_recent in 953 ms
[D 7.34.665] lib/git/repository.lua:240 [REPO]: Refreshed update_unpulled in 962 ms
[D 7.34.753] lib/git/repository.lua:240 [REPO]: Refreshed update_sequencer_status in 1051 ms
[D 7.36.077] buffers/status/init.lua:30 [STATUS] Registering instance for: /home/path/to/repo
[D 7.36.093] lib/buffer.lua:616 [BUFFER:7] Showing buffer in window 1004
[D 7.36.093] lib/buffer.lua:619 [BUFFER:7] Setting buffer options
[D 7.36.093] lib/buffer.lua:631 [BUFFER:7] Setting filetype: NeogitStatus
[D 7.36.097] lib/buffer.lua:636 [BUFFER:7] Building user key-mappings
[D 7.36.097] lib/buffer.lua:645 [BUFFER:7] Setting key-mappings
[D 7.36.098] lib/buffer.lua:666 [BUFFER:7] Initializing buffer
[D 7.36.098] lib/buffer.lua:671 [BUFFER:7] Setting window options
[D 7.36.098] lib/buffer.lua:695 [BUFFER:7] Rendering buffer
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitPullComplete
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitPushComplete
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitStash
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitReset
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitMerge
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitRebase
[D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitFetchComplete
[D 7.36.100] lib/buffer.lua:727 [BUFFER:7] Running config.after callback
[D 7.36.100] watcher.lua:53 [WATCHER] Registered buffer StatusBuffer
[D 7.36.100] watcher.lua:86 [WATCHER] Watching git dir: /home/path/to/repo/.git
[D 7.36.100] lib/buffer.lua:734 [BUFFER:7] Setting up on_detach callback
[D 7.36.100] lib/buffer.lua:744 [BUFFER:7] Setting up context highlighting
[D 7.36.100] lib/buffer.lua:785 [BUFFER:7] Setting up foldmarkers
[D 7.36.100] lib/buffer.lua:826 [BUFFER:7] Setting CWD to: /home/path/to/repo
[D 7.36.100] buffers/status/init.lua:264 [STATUS] Beginning refresh from UNKNOWN
[D 7.36.100] lib/git/repository.lua:248 [REPO] Callback registered from status
[D 7.36.100] lib/git/repository.lua:296 [REPO] (767736100) Already running - setting interrupt for 767733701
[D 7.36.100] lib/git/repository.lua:240 [REPO]: Refreshed update_rebase_status in 0 ms
[D 7.36.676] lib/git/repository.lua:240 [REPO]: Refreshed update_status in 575 ms
[D 7.36.686] lib/git/repository.lua:240 [REPO]: Refreshed update_recent in 584 ms
[D 7.36.687] lib/git/repository.lua:240 [REPO]: Refreshed update_sequencer_status in 587 ms
[D 7.36.750] lib/git/repository.lua:240 [REPO]: Refreshed update_unpulled in 649 ms
I'm also having an issue in a specific repo, even after adding the config option mentioned above. When I run
require("neogit").open()
I get this error:E5108: Error executing lua: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/plenary.nvim/lua/ plenary/async/async.lua:18: The coroutine failed with this message: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...ocal/share/nvim/lazy/neogit/lua/neogit/lib/git/hooks.lua:57: attempt to index a nil value stack traceback: [C]: in function 'error' ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next' ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'step' ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:48: in function 'execute' ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:118: in function 'dispatch_refresh' .../dom.batten/.local/share/nvim/lazy/neogit/lua/neogit.lua:114: in function 'open_status_buffer' .../dom.batten/.local/share/nvim/lazy/neogit/lua/neogit.lua:178: in function 'open' /home/.config/nvim/lua/plugins/neogit.lua:26: in function </home/.config/nvim/lua/plugins/neogit.lua:22>
if I close the error, run
neogit.open()
again, I get the same error but when I close the error then the console pops open, albeit without any changes picked up. The logs look like this:[D 7.33.669] lib/state.lua:10 [STATE]: Reading file: '/home/.local/state/nvim/neogit/%Users%dom.batten%path%to%repo' [D 7.33.670] lib/state.lua:10 [STATE]: Loaded: '/home/.local/state/nvim/neogit/%Users%dom.batten%path%to%repo' [D 7.33.691] lib/git/repository.lua:191 [REPO]: Registered Repository for: /home/path/to/repo [D 7.33.691] lib/git/repository.lua:203 [REPO]: Initializing Repository [D 7.33.701] lib/git/repository.lua:240 [REPO]: Refreshed update_rebase_status in 0 ms [D 7.34.596] lib/git/repository.lua:240 [REPO]: Refreshed update_status in 894 ms [D 7.34.614] lib/git/config.lua:102 [Config] Rebuilding git config_cache [D 7.34.656] lib/git/repository.lua:240 [REPO]: Refreshed update_recent in 953 ms [D 7.34.665] lib/git/repository.lua:240 [REPO]: Refreshed update_unpulled in 962 ms [D 7.34.753] lib/git/repository.lua:240 [REPO]: Refreshed update_sequencer_status in 1051 ms [D 7.36.077] buffers/status/init.lua:30 [STATUS] Registering instance for: /home/path/to/repo [D 7.36.093] lib/buffer.lua:616 [BUFFER:7] Showing buffer in window 1004 [D 7.36.093] lib/buffer.lua:619 [BUFFER:7] Setting buffer options [D 7.36.093] lib/buffer.lua:631 [BUFFER:7] Setting filetype: NeogitStatus [D 7.36.097] lib/buffer.lua:636 [BUFFER:7] Building user key-mappings [D 7.36.097] lib/buffer.lua:645 [BUFFER:7] Setting key-mappings [D 7.36.098] lib/buffer.lua:666 [BUFFER:7] Initializing buffer [D 7.36.098] lib/buffer.lua:671 [BUFFER:7] Setting window options [D 7.36.098] lib/buffer.lua:695 [BUFFER:7] Rendering buffer [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitPullComplete [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitPushComplete [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitStash [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitReset [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitMerge [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitRebase [D 7.36.099] lib/buffer.lua:709 [BUFFER:7] Setting user autocmd for: NeogitFetchComplete [D 7.36.100] lib/buffer.lua:727 [BUFFER:7] Running config.after callback [D 7.36.100] watcher.lua:53 [WATCHER] Registered buffer StatusBuffer [D 7.36.100] watcher.lua:86 [WATCHER] Watching git dir: /home/path/to/repo/.git [D 7.36.100] lib/buffer.lua:734 [BUFFER:7] Setting up on_detach callback [D 7.36.100] lib/buffer.lua:744 [BUFFER:7] Setting up context highlighting [D 7.36.100] lib/buffer.lua:785 [BUFFER:7] Setting up foldmarkers [D 7.36.100] lib/buffer.lua:826 [BUFFER:7] Setting CWD to: /home/path/to/repo [D 7.36.100] buffers/status/init.lua:264 [STATUS] Beginning refresh from UNKNOWN [D 7.36.100] lib/git/repository.lua:248 [REPO] Callback registered from status [D 7.36.100] lib/git/repository.lua:296 [REPO] (767736100) Already running - setting interrupt for 767733701 [D 7.36.100] lib/git/repository.lua:240 [REPO]: Refreshed update_rebase_status in 0 ms [D 7.36.676] lib/git/repository.lua:240 [REPO]: Refreshed update_status in 575 ms [D 7.36.686] lib/git/repository.lua:240 [REPO]: Refreshed update_recent in 584 ms [D 7.36.687] lib/git/repository.lua:240 [REPO]: Refreshed update_sequencer_status in 587 ms [D 7.36.750] lib/git/repository.lua:240 [REPO]: Refreshed update_unpulled in 649 ms
Ah, forgot to check if vim.uv.fs_stat()
returns nil. Pushed the fix.
Thanks @LarssonMartin1998 and @Miyelsh <3
@CKolkey that's fixed it 🙌 thanks vm for your quick response.
Description
Hey,
I only get this issue in our specific repository at work where I am completely unable to use Neogit, it flat out doesnt' work. When I run the
:Neogit
command to open and interact with git, it doesn't load for a few seconds and saysv Head: 000000 (no commits)
. After a few seconds it throws an error log.Given the log, at first I thought it was some issue with the serialized session, however, clearing the session and disabling the auto_session plugin made no difference.
Unfortunately, I haven't been able to pin point what the difference is in this repo versus all other repos where this plugin works wonders.
Neovim version
NVIM v0.11.0-dev-604+g3b87fa406 Build type: Release LuaJIT 2.1.1724512491
Operating system and version
macOS 14.6.1
Steps to reproduce
Difficult to reproduce unless you're in a git repo with this same issue which I am unable to pin point. Otherwise, start neovim, enter
:Neogit
, and observe the issue.Expected behavior
No response
Actual behavior
https://github.com/user-attachments/assets/244d0d73-d266-4b3e-a074-f6212a944aac
Here is the log:
Minimal config