Open LarssonMartin1998 opened 1 week ago
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'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
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