NeogitOrg / neogit

An interactive and powerful Git interface for Neovim, inspired by Magit
MIT License
3.64k stars 218 forks source link

Status not being automatically refreshed when staging / unstaging / commiting / pushing on Windows #1310

Closed Shaobin-Jiang closed 1 month ago

Shaobin-Jiang commented 1 month ago

Description

In previous versions of neogit, say when I press s on an unstaged change, it stages the change and moves that change to the staged section. Or, when I make a commit, neogit would immediately show that the change is commited.

However, after upgrading to neovim 0.10.0 and using the latest version of neogit, the change in status is not displayed immediately on the page. I press s on an unstaged change but nothing happens. I close and reopen neogit, and I see the change is staged.

This only happens for Windows, though, it seems. On Arch I cannot replicate this.

Neovim version

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info

Operating system and version

Windows 11

Steps to reproduce

  1. Open neogit with :Neogit<CR>
  2. Stage a change
  3. Reopen neogit

Expected behavior

Neogit should show that the change is staged.

Actual behavior

Nothing happens. The cursor does a lot of flashing, though.

Minimal config

-- setup with lazy.nvim
{
    "NeogitOrg/neogit",
    dependencies = { "nvim-lua/plenary.nvim", "sindrets/diffview.nvim" },
    main = "neogit",
    opts = {
        disable_hint = true,
        status = {
            recent_commit_count = 30,
        },
        integrations = {
            diffview = true,
        },
        commit_editor = {
            kind = "auto",
        },
        auto_refresh = true,
    },
    keys = {
        { "<leader>gt", "<Cmd>Neogit<CR>", desc = "neogit", silent = true, noremap = true },
    },
}
CKolkey commented 1 month ago

Windows.... ok, try this: NEOGIT_LOG_LEVEL="debug" NEOGIT_LOG_FILE="true" NEOGIT_DEBUG=true nvim

Do a "stage" operation (or whatever doesn't properly refresh the buffer), then send me the log file. Call := require("neogit").get_log_file_path() to get the location of the log file.

Also, <c-r> will manually repaint the buffer. See if triggering that shows the correct state.

ptn commented 1 month ago

I'm having the same issue (on Mac). The only thing that automatically updates the status buffer is staging/unstaging, neither committing nor pushing do. Manually refreshing always works.

Here's my log file:

[DEBUG Tue May 21 09:54:40 2024] ...s/.local/share/nvim/lazy/neogit/lua/neogit/lib/state.lua:10: [STATE]: Reading file: '/Users/ptorres/.local/state/nvim/neogit/%Users%ptorres%code%dotfiles%nvim'
[DEBUG Tue May 21 09:54:40 2024] ...s/.local/share/nvim/lazy/neogit/lua/neogit/lib/state.lua:10: [STATE]: Loaded: '/Users/ptorres/.local/state/nvim/neogit/%Users%ptorres%code%dotfiles%nvim'
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:173: [REPO]: Initializing Repository
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:556: [BUFFER:28] Showing buffer in window 1024
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:559: [BUFFER:28] Setting buffer options
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:571: [BUFFER:28] Setting filetype: NeogitStatus
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:576: [BUFFER:28] Building mappings
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:597: [BUFFER:28] Initializing buffer
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:602: [BUFFER:28] Setting window options
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:626: [BUFFER:28] Rendering buffer
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:647: [BUFFER:28] Running config.after callback
[DEBUG Tue May 21 09:54:40 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:191: [STATUS] Starting file watcher
[DEBUG Tue May 21 09:54:40 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:31: [WATCHER] Watching git dir: /Users/ptorres/code/dotfiles/.git
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:654: [BUFFER:28] Setting up on_detach callback
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:664: [BUFFER:28] Setting up context highlighting
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:705: [BUFFER:28] Setting up foldmarkers
[DEBUG Tue May 21 09:54:40 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:746: [BUFFER:28] Setting CWD to: /Users/ptorres/code/dotfiles
[INFO  Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: UNKNOWN)
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[WARN  Tue May 21 09:54:40 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 18 ms
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_diffs
[DEBUG Tue May 21 09:54:40 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: gitconfig
[DEBUG Tue May 21 09:54:40 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: nvim/lua/plugins/auto-save.lua
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_rebase_status
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_branch_information
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unpulled
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_bisect_information
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_stashes
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_merge_status
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_sequencer_status
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unmerged
[DEBUG Tue May 21 09:54:40 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_recent
[DEBUG Tue May 21 09:54:40 2024] ...cal/share/nvim/lazy/neogit/lua/neogit/lib/git/config.lua:102: [Config] Rebuilding git config_cache
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG Tue May 21 09:54:41 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:278: [STATUS] Dispatching Refresh
[DEBUG Tue May 21 09:54:41 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:238: [STATUS] Beginning refresh from unknown
[DEBUG Tue May 21 09:54:41 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:302: [STATUS]: Acquired refresh lock:
[INFO  Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: status)
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[WARN  Tue May 21 09:54:41 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 19 ms
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_diffs
[DEBUG Tue May 21 09:54:41 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: gitconfig
[DEBUG Tue May 21 09:54:41 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: nvim/lua/plugins/auto-save.lua
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_rebase_status
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_branch_information
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unpulled
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_bisect_information
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_stashes
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_merge_status
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_sequencer_status
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unmerged
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_recent
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG Tue May 21 09:54:41 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG Tue May 21 09:54:41 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:245: [STATUS][Refresh Callback] Running
[DEBUG Tue May 21 09:54:41 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:257: [STATUS][Refresh Callback] Rendering UI
[DEBUG Tue May 21 09:54:41 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/ui/init.lua:446: [UI] No Cursor Section
[DEBUG Tue May 21 09:54:41 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/ui/init.lua:455: [UI] No Section Found ''
[DEBUG Tue May 21 09:54:41 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/ui/init.lua:466: [UI] No file - using section.first
[INFO  Tue May 21 09:54:41 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:267: [STATUS] Refresh lock is now free
[DEBUG Tue May 21 09:54:42 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:199: [DIFF] Loading diff for: nvim/lua/plugins/auto-save.lua
[DEBUG Tue May 21 09:54:45 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:45 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:238: [STATUS] Beginning refresh from unknown
[DEBUG Tue May 21 09:54:45 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:302: [STATUS]: Acquired refresh lock:
[INFO  Tue May 21 09:54:45 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: status)
[DEBUG Tue May 21 09:54:45 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[DEBUG Tue May 21 09:54:45 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:45 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG Tue May 21 09:54:45 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[WARN  Tue May 21 09:54:45 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 17 ms
[DEBUG Tue May 21 09:54:45 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:276: [STATUS] Refresh lock is active. Skipping refresh from watcher
[DEBUG Tue May 21 09:54:45 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:234: [REPO]: Refreshing update_diffs
[DEBUG Tue May 21 09:54:45 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG Tue May 21 09:54:45 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG Tue May 21 09:54:45 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:245: [STATUS][Refresh Callback] Running
[DEBUG Tue May 21 09:54:45 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:257: [STATUS][Refresh Callback] Rendering UI
[DEBUG Tue May 21 09:54:45 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/ui/init.lua:476: [UI] No file found "nvim/lua/plugins/auto-save.lua"
[DEBUG Tue May 21 09:54:45 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/ui/init.lua:483: [UI] No hunk - using file.first
[INFO  Tue May 21 09:54:45 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:267: [STATUS] Refresh lock is now free
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:556: [BUFFER:30] Showing buffer in window 1025
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:559: [BUFFER:30] Setting buffer options
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:571: [BUFFER:30] Setting filetype: NeogitPopup
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:576: [BUFFER:30] Building mappings
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:602: [BUFFER:30] Setting window options
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:626: [BUFFER:30] Rendering buffer
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:631: [BUFFER:30] Setting autocmd for: WinLeave
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:647: [BUFFER:30] Running config.after callback
[DEBUG Tue May 21 09:54:45 2024] ...cal/share/nvim/lazy/neogit/lua/neogit/lib/popup/init.lua:307: [POPUP]: Invoking action "c" of NeogitCommitPopup
[DEBUG Tue May 21 09:54:45 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:640: [BUFFER:30] Clearing autocmd group
[DEBUG Tue May 21 09:54:45 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:14: [CLIENT] Neogit path: /Users/ptorres/.local/share/nvim/lazy/neogit
[DEBUG Tue May 21 09:54:45 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:15: [CLIENT] Neovim path: '/usr/local/Cellar/neovim/0.10.0/bin/nvim'
[DEBUG Tue May 21 09:54:45 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:155: [CLIENT] Calling editor command
[DEBUG Tue May 21 09:54:45 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:173: [REPO]: Initializing Repository
[DEBUG Tue May 21 09:54:46 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'hint: Waiting for your editor to close the file... '
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { change = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:62: [CLIENT] File target: /Users/ptorres/code/dotfiles/.git/COMMIT_EDITMSG
[DEBUG Tue May 21 09:54:46 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:65: [CLIENT] Client address: /var/folders/xd/zqz84hcd3_z73n26c22ks4gr0000gn/T/nvim.ptorres/QyseLv/nvim.21285.1
[DEBUG Tue May 21 09:54:46 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:83: [CLIENT] Invoked editor with target: /Users/ptorres/code/dotfiles/.git/COMMIT_EDITMSG, from: /var/folders/xd/zqz84hcd3_z73n26c22ks4gr0000gn/T/nvim.ptorres/QyseLv/nvim.21285.1
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:48: [EDITOR] Opening editor as tab
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:74: [EDITOR] Filetype NeogitCommitMessage
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:549: [BUFFER:32] Loading content from file: /Users/ptorres/code/dotfiles/.git/COMMIT_EDITMSG
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:556: [BUFFER:32] Showing buffer in window 1026
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:559: [BUFFER:32] Setting buffer options
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:571: [BUFFER:32] Setting filetype: NeogitCommitMessage
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:576: [BUFFER:32] Building mappings
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:602: [BUFFER:32] Setting window options
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:631: [BUFFER:32] Setting autocmd for: QuitPre
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:647: [BUFFER:32] Running config.after callback
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:278: [STATUS] Dispatching Refresh
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:238: [STATUS] Beginning refresh from watcher
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:302: [STATUS]: Acquired refresh lock:
[INFO  Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: status)
[WARN  Tue May 21 09:54:46 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always config --get core.commentChar' failed with code 1 after 25 ms
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:128: [EDITOR] Using comment character '#'
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: '4913' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG~' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:182: [EDITOR] Loading syntax for gitcommit
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:195: [EDITOR] Opening Diffview for staged changes
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG~' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:46 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:199: [DIFF] Loading diff for: nvim/lua/plugins/auto-save.lua
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:556: [BUFFER:34] Showing buffer in window 1027
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:559: [BUFFER:34] Setting buffer options
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:571: [BUFFER:34] Setting filetype: NeogitDiffView
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:576: [BUFFER:34] Building mappings
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:602: [BUFFER:34] Setting window options
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:626: [BUFFER:34] Rendering buffer
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:647: [BUFFER:34] Running config.after callback
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:664: [BUFFER:34] Setting up context highlighting
[DEBUG Tue May 21 09:54:46 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:654: [BUFFER:32] Setting up on_detach callback
[WARN  Tue May 21 09:54:46 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 22 ms
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_diffs
[DEBUG Tue May 21 09:54:46 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: gitconfig
[DEBUG Tue May 21 09:54:46 2024] ...local/share/nvim/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: nvim/lua/plugins/auto-save.lua
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_rebase_status
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_branch_information
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unpulled
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_bisect_information
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_stashes
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_merge_status
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_sequencer_status
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unmerged
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_recent
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG Tue May 21 09:54:46 2024] ...share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:245: [STATUS][Refresh Callback] Running
[DEBUG Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:257: [STATUS][Refresh Callback] Rendering UI
[INFO  Tue May 21 09:54:46 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:267: [STATUS] Refresh lock is now free
[DEBUG Tue May 21 09:54:56 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:236: [EDITOR] Action N: Submit
[DEBUG Tue May 21 09:54:56 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:640: [BUFFER:32] Clearing autocmd group
[DEBUG Tue May 21 09:54:56 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:657: [BUFFER:32] Running on_detach
[DEBUG Tue May 21 09:54:56 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:99: [EDITOR] Cleaning Up
[DEBUG Tue May 21 09:54:56 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:103: [EDITOR] Running on_unload callback
[DEBUG Tue May 21 09:54:56 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:110: [EDITOR] Closing diff view
[DEBUG Tue May 21 09:54:56 2024] ...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:115: [EDITOR] Done cleaning up
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: '4913' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG~' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'COMMIT_EDITMSG~' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'HEAD.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: '[master 918805e] Try a shorter wait time to auto-save'
[DEBUG Tue May 21 09:54:56 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: ' 1 file changed, 2 insertions(+), 2 deletions(-)'
[DEBUG Tue May 21 09:54:56 2024] ...rres/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:159: [CLIENT] DONE editor command
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'HEAD.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'AUTO_MERGE.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:56 2024] ...res/.local/share/nvim/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'packed-refs.lock' { rename = true } (ignoring)
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:556: [BUFFER:38] Showing buffer in window 1035
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:559: [BUFFER:38] Setting buffer options
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:571: [BUFFER:38] Setting filetype: NeogitPopup
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:576: [BUFFER:38] Building mappings
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:602: [BUFFER:38] Setting window options
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:626: [BUFFER:38] Rendering buffer
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:631: [BUFFER:38] Setting autocmd for: WinLeave
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:647: [BUFFER:38] Running config.after callback
[DEBUG Tue May 21 09:54:57 2024] ...cal/share/nvim/lazy/neogit/lua/neogit/lib/popup/init.lua:307: [POPUP]: Invoking action "p" of NeogitPushPopup
[DEBUG Tue May 21 09:54:57 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:640: [BUFFER:38] Clearing autocmd group
[DEBUG Tue May 21 09:54:57 2024] ...hare/nvim/lazy/neogit/lua/neogit/popups/push/actions.lua:28: Pushing to origin/master
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Enumerating objects: 11, done.'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Counting objects:   9% (1/11)Counting objects:  18% (2/11)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Counting objects:  27% (3/11)Counting objects:  36% (4/11)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Counting objects:  45% (5/11)Counting objects:  54% (6/11)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Counting objects:  63% (7/11)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Counting objects:  72% (8/11)Counting objects:  81% (9/11)Counting objects:  90% (10/11)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Counting objects: 100% (11/11)Counting objects: 100% (11/11), done.'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Delta compression using up to 12 threads'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Compressing objects:  16% (1/6)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Compressing objects:  33% (2/6)Compressing objects:  50% (3/6)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Compressing objects:  66% (4/6)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Compressing objects:  83% (5/6)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Compressing objects: 100% (6/6)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Compressing objects: 100% (6/6), done.'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Writing objects:  16% (1/6)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Writing objects:  33% (2/6)Writing objects:  50% (3/6)Writing objects:  66% (4/6)Writing objects:  83% (5/6)Writing objects: 100% (6/6)Writing objects: 100% (6/6), 518 bytes | 518.00 KiB/s, done.'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'Total 6 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)'
[DEBUG Tue May 21 09:54:57 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'remote: Resolving deltas:   0% (0/4)remote: Resolving deltas:  25% (1/4)remote: Resolving deltas:  50% (2/4)remote: Resolving deltas:  75% (3/4)remote: Resolving deltas: 100% (4/4)remote: Resolving deltas: 100% (4/4), completed with 4 local objects.'
[DEBUG Tue May 21 09:54:58 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: 'To github.com:ptn/dotfiles.git'
[DEBUG Tue May 21 09:54:58 2024] ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:827: Matching interactive cmd output: '   5b7fd4e..918805e  master -> master'
[DEBUG Tue May 21 09:54:58 2024] ...hare/nvim/lazy/neogit/lua/neogit/popups/push/actions.lua:35: Pushed to origin/master
[DEBUG Tue May 21 09:55:26 2024] .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:657: [BUFFER:28] Running on_detach
Shaobin-Jiang commented 1 month ago

Set the env variables as instructed. Then I deleted the old log file before opening neogit and attempting to stage a change. Here is what is in the log:

[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:556: [BUFFER:15] Showing buffer in window 1018
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:559: [BUFFER:15] Setting buffer options
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:571: [BUFFER:15] Setting filetype: NeogitStatus
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:576: [BUFFER:15] Building mappings
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:597: [BUFFER:15] Initializing buffer
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:602: [BUFFER:15] Setting window options
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:626: [BUFFER:15] Rendering buffer
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:647: [BUFFER:15] Running config.after callback
[DEBUG 5/22/2024 12:00:50 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:191: [STATUS] Starting file watcher
[DEBUG 5/22/2024 12:00:50 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:31: [WATCHER] Watching git dir: C:/Users/dell/AppData/Local/nvim\.git
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:654: [BUFFER:15] Setting up on_detach callback
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:664: [BUFFER:15] Setting up context highlighting
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:705: [BUFFER:15] Setting up foldmarkers
[DEBUG 5/22/2024 12:00:50 PM] ...ta/Local/nvim-data/lazy/neogit/lua/neogit/lib/buffer.lua:746: [BUFFER:15] Setting CWD to: C:/Users/dell/AppData/Local/nvim
[INFO  5/22/2024 12:00:50 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: UNKNOWN)
[DEBUG 5/22/2024 12:00:50 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[WARN  5/22/2024 12:00:50 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 57 ms
[WARN  5/22/2024 12:00:50 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always describe --long --tags HEAD' failed with code 128 after 57 ms
[WARN  5/22/2024 12:00:50 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:663: [CLI] [STDERR] fatal: No names found, cannot describe anything.
[DEBUG 5/22/2024 12:00:50 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_diffs
[DEBUG 5/22/2024 12:00:50 PM] .../Local/nvim-data/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: README.md
[DEBUG 5/22/2024 12:00:50 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_stashes
[DEBUG 5/22/2024 12:00:50 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_sequencer_status
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_branch_information
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_bisect_information
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unmerged
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_recent
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unpulled
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_merge_status
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_rebase_status
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG 5/22/2024 12:00:51 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:278: [STATUS] Dispatching Refresh
[DEBUG 5/22/2024 12:00:51 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:238: [STATUS] Beginning refresh from unknown
[DEBUG 5/22/2024 12:00:51 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:302: [STATUS]: Acquired refresh lock:
[INFO  5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: status)
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[WARN  5/22/2024 12:00:51 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 56 ms
[WARN  5/22/2024 12:00:51 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always describe --long --tags HEAD' failed with code 128 after 58 ms
[WARN  5/22/2024 12:00:51 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:663: [CLI] [STDERR] fatal: No names found, cannot describe anything.
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_diffs
[DEBUG 5/22/2024 12:00:51 PM] .../Local/nvim-data/lazy/neogit/lua/neogit/lib/git/diff.lua:260: [DIFF] Invalidating cached diff for: README.md
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_stashes
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_sequencer_status
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_branch_information
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_bisect_information
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unmerged
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_recent
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_unpulled
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_merge_status
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:193: [REPO]: Refreshing update_rebase_status
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG 5/22/2024 12:00:51 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG 5/22/2024 12:00:51 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:245: [STATUS][Refresh Callback] Running
[DEBUG 5/22/2024 12:00:51 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:257: [STATUS][Refresh Callback] Rendering UI
[DEBUG 5/22/2024 12:00:51 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/ui/init.lua:466: [UI] No file - using section.first
[INFO  5/22/2024 12:00:51 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:267: [STATUS] Refresh lock is now free
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { change = true } (ignoring)
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { change = true } (ignoring)
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:66: [WATCHER] Git dir update: 'index.lock' { rename = true } (ignoring)
[DEBUG 5/22/2024 12:00:53 PM] ...pData/Local/nvim-data/lazy/neogit/lua/neogit/watcher.lua:70: [WATCHER] Git dir update: 'index' { rename = true }
[DEBUG 5/22/2024 12:00:53 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:238: [STATUS] Beginning refresh from unknown
[DEBUG 5/22/2024 12:00:53 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:302: [STATUS]: Acquired refresh lock:
[INFO  5/22/2024 12:00:53 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:218: [REPO]: Refreshing START (source: status)
[DEBUG 5/22/2024 12:00:53 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:224: [REPO]: Refreshing 'update_status'
[DEBUG 5/22/2024 12:00:53 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:276: [STATUS] Refresh lock is active. Skipping refresh from watcher
[WARN  5/22/2024 12:00:53 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always rev-parse --verify --quiet refs/heads/origin/master' failed with code 1 after 56 ms
[WARN  5/22/2024 12:00:53 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:657: [CLI] Execution of 'git --no-pager --literal-pathspecs --no-optional-locks -c core.preloadindex=true -c color.ui=always describe --long --tags HEAD' failed with code 128 after 57 ms
[WARN  5/22/2024 12:00:53 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/git/cli.lua:663: [CLI] [STDERR] fatal: No names found, cannot describe anything.
[DEBUG 5/22/2024 12:00:53 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:234: [REPO]: Refreshing update_diffs
[DEBUG 5/22/2024 12:00:53 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:244: [REPO]: Refreshes complete
[DEBUG 5/22/2024 12:00:53 PM] .../nvim-data/lazy/neogit/lua/neogit/lib/git/repository.lua:247: [REPO]: Running refresh callback
[DEBUG 5/22/2024 12:00:53 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:245: [STATUS][Refresh Callback] Running
[DEBUG 5/22/2024 12:00:53 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:257: [STATUS][Refresh Callback] Rendering UI
[DEBUG 5/22/2024 12:00:53 PM] ...a/Local/nvim-data/lazy/neogit/lua/neogit/lib/ui/init.lua:483: [UI] No hunk - using file.first
[INFO  5/22/2024 12:00:53 PM] ...nvim-data/lazy/neogit/lua/neogit/buffers/status/init.lua:267: [STATUS] Refresh lock is now free
ptn commented 1 month ago

I have updated and I now have the commit that sets up autocmds (68d05efffee9def6e6d777811e9e1d151303e1d9), and the problem persists.

akthe-at commented 1 month ago

I am not sure if this helps but when I first started noticing this when I moved from nvim 0.9.5 to 0.10 nighties (before the 0.10) release and started using the neogit nightly branch as well.

CKolkey commented 1 month ago

Since I cant seem to reproduce it, if someone who can wouldn't mind bisecting for the offending change, that might be enough to start fixing it :)

akthe-at commented 1 month ago

@CKolkey Here is the commit from my git bisect: [d6b80dc9766b32beea79c7100f551041fda63f47]

akthe-at commented 1 month ago

actually that was my first time doing a bisect, didn't realize I had one more to go... here is the result image

Shaobin-Jiang commented 1 month ago

I have, to some extent, identified where the rub is. The issue seems to arise due to self.state not being updated properly in refresh in file neogit/buffers/status/init.lua, located in line 269:

self.buffer.ui:render(unpack(ui.Status(self.state, self.config)))

While I am totally at a loss why this is happening on Windows and not on Linux, I have found a fix nevertheless. Just replacing this line with:

self.buffer.ui:render(unpack(ui.Status(require("neogit.lib.git").repo.state, self.config)))

It will solve the problem.

Shaobin-Jiang commented 1 month ago

Actual behavior Nothing happens. The cursor does a lot of flashing, though.

My fix does not help with this, though.

akthe-at commented 1 month ago

I have, to some extent, identified where the rub is. The issue seems to arise due to self.state not being updated properly in refresh in file neogit/buffers/status/init.lua, located in line 269:

self.buffer.ui:render(unpack(ui.Status(self.state, self.config)))

While I am totally at a loss why this is happening on Windows and not on Linux, I have found a fix nevertheless. Just replacing this line with:

self.buffer.ui:render(unpack(ui.Status(require("neogit.lib.git").repo.state, self.config)))

It will solve the problem.

When I use the debugger on the two different versions above, you can see that they are not referencing the same table and it seems like the git.repo.state table is nested inside the self.state table? I am not sure though this is my first time using vim-be-kind. instead of calling require("neogit.lib.git") I also tested just calling:

self.buffer.ui:render(unpack(ui.Status(git.repo.state, self.config)))

because that require statement is at the top of the file already, and that works just fine as well.

This fix didn't work for adding an untracked file to .gitignore, can anyone else confirm the same?

ptn commented 1 month ago

Actual behavior Nothing happens. The cursor does a lot of flashing, though.

My fix does not help with this, though.

That part's fine, I get this everywhere in neovim unrelated to neogit. The LazyVim welcome dashboard does it for example.

ptn commented 1 month ago

This fix didn't work for adding an untracked file to .gitignore, can anyone else confirm the same?

@akthe-at If you go to the known good version (anything before 93773498), does this still happen there? This very well could be a different bug.

I'm unable to run this myself at the moment.

CKolkey commented 1 month ago

thanks for digging into that - I'll do my best to take a look soon. Due to some personal-life stuff I have less bandwidth for things right now, so if anyone feels like making a PR, I will most definitely appreciate it.

Note that git.repo does some CWD resolution in a metatable in here: https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/lib/git.lua#L35

May or may not be related. self.state in the status buffer should be a reference to the same table, but if for some reason that isn't, or if the resolved repo state table is different than the one the buffer holds a reference to, it could explain things here.

akthe-at commented 1 month ago

This fix didn't work for adding an untracked file to .gitignore, can anyone else confirm the same?

@akthe-at If you go to the known good version (anything before 9377349), does this still happen there? This very well could be a different bug.

I'm unable to run this myself at the moment.

@ptn .gitignore in the commit immediately before the aforementioned "bad" commit above results in a properly changed status.

akthe-at commented 1 month ago

@ptn one more piece of the puzzle, discarding a newly modified .gitignore change in the status buffer results in a nicely updating status buffer, only adding an item to the .gitignore has a problem.

CKolkey commented 1 month ago

Curious: does this branch help? https://github.com/NeogitOrg/neogit/pull/1331

akthe-at commented 1 month ago

Curious: does this branch help? #1331

@CKolkey I am afraid not. :(

akthe-at commented 1 month ago

@CKolkey This is a pathing issue of windows backslashes vs. forward slashes of unix. There are some areas that get the correct slash correction and some that do not and I think that is the culprit?

This code from repository.lua is one example, vim.loop.cwd() returns C:\Users\Etc... in the correct style but the upstream dir that gets passed to this function is all forward slashed...I think that is from the even further down snippet inside neogit.lua.

function Repo.instance(dir)
  local cwd = dir or vim.loop.cwd()
  if cwd and not instances[cwd] then
    instances[cwd] = Repo.new(cwd)
  end

  return instances[cwd]
end
local function open_status_buffer(opts)
  local status = require("neogit.buffers.status")
  local config = require("neogit.config")
  local a = require("plenary.async")

  -- We need to construct the repo instance manually here since the actual CWD may not be the directory neogit is
  -- going to open into. We will use vim.fn.lcd() in the status buffer constructor, so this will eventually be
  -- correct.
  local repo = require("neogit.lib.git.repository").instance(opts.cwd)

  local instance = status.new(repo.state, config.values, repo.git_root):open(opts.kind, opts.cwd)

  a.run(function()
    repo:refresh {
      callback = function()
        instance:dispatch_refresh()
      end,
    }
  end)
end

I want to try and correct some of these paths but there are a whole bunch of cwd items thrown around this code base and this is my first day looking at this code base so I feel like if I just point this out somebody that is more familiar might know right where to look. I saw somewhere in this codebase a spot where there was path corrections being applied for windows vs unix but I couldn't find it as I wrote this but wondered if that needed to be applied in a few more spots.

ptn commented 1 month ago

I'd like to point out that I'm on osx and seeing this bug. It's possible that there's more than one root cause though.

"Adam K." @.***> writes:

@CKolkey This is a pathing issue of windows backslashes vs. forward slashes of unix. There are some areas that get the correct slash correction and some that do not and I think that is the culprit?

This code from repository.lua is one example, vim.loop.cwd() returns C:\Users\Etc... in the correct style but the upstream dir that gets passed to this function is all forward slashed...I think that is from the even further down snippet inside neogit.lua.

function Repo.instance(dir) local cwd = dir or vim.loop.cwd() if cwd and not instances[cwd] then instances[cwd] = Repo.new(cwd) end

return instances[cwd] end local function open_status_buffer(opts) local status = require("neogit.buffers.status") local config = require("neogit.config") local a = require("plenary.async")

-- We need to construct the repo instance manually here since the actual CWD may not be the directory neogit is -- going to open into. We will use vim.fn.lcd() in the status buffer constructor, so this will eventually be -- correct. local repo = require("neogit.lib.git.repository").instance(opts.cwd)

local instance = status.new(repo.state, config.values, repo.git_root):open(opts.kind, opts.cwd)

a.run(function() repo:refresh { callback = function() instance:dispatch_refresh() end, } end) end

I want to try and correct some of these paths but there are a whole bunch of cwd items thrown around this code base and this is my first day looking at this code base so I feel like if I just point this out somebody that is more familiar might know right where to look. I saw somewhere in this codebase a spot where there was path corrections being applied for windows vs unix but I couldn't find it as I wrote this but wondered if that needed to be applied in a few more spots.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

~ Pablo May your city be overrun by trees.

Shaobin-Jiang commented 1 month ago

@CKolkey This is a pathing issue of windows backslashes vs. forward slashes of unix. There are some areas that get the correct slash correction and some that do not and I think that is the culprit?

This code from repository.lua is one example, vim.loop.cwd() returns C:\Users\Etc... in the correct style but the upstream dir that gets passed to this function is all forward slashed...I think that is from the even further down snippet inside neogit.lua.

function Repo.instance(dir)
  local cwd = dir or vim.loop.cwd()
  if cwd and not instances[cwd] then
    instances[cwd] = Repo.new(cwd)
  end

  return instances[cwd]
end
local function open_status_buffer(opts)
  local status = require("neogit.buffers.status")
  local config = require("neogit.config")
  local a = require("plenary.async")

  -- We need to construct the repo instance manually here since the actual CWD may not be the directory neogit is
  -- going to open into. We will use vim.fn.lcd() in the status buffer constructor, so this will eventually be
  -- correct.
  local repo = require("neogit.lib.git.repository").instance(opts.cwd)

  local instance = status.new(repo.state, config.values, repo.git_root):open(opts.kind, opts.cwd)

  a.run(function()
    repo:refresh {
      callback = function()
        instance:dispatch_refresh()
      end,
    }
  end)
end

I want to try and correct some of these paths but there are a whole bunch of cwd items thrown around this code base and this is my first day looking at this code base so I feel like if I just point this out somebody that is more familiar might know right where to look. I saw somewhere in this codebase a spot where there was path corrections being applied for windows vs unix but I couldn't find it as I wrote this but wondered if that needed to be applied in a few more spots.

I too have noticed this. I made this change to Repo.instance in neogit/lib/git/repository.lua:

function Repo.instance(dir)
  local cwd = dir or vim.loop.cwd()
  if cwd and not instances[cwd] then
    instances[cwd] = Repo.new(cwd)
    vim.notify(vim.inspect(instances)) -- this line is added
  end

  return instances[cwd]
end

And now when I start neogit, I see two instances of the same repo instead one: one is in forward slash and the other is in backslash. Substituting the \ with / here alone solves the current issue without having to changing self.state to git.repo.state as I described earlier:

function Repo.instance(dir)
  local cwd = dir or vim.loop.cwd()
  cwd = string.gsub(cwd, "\\", "/")
  if cwd and not instances[cwd] then
    instances[cwd] = Repo.new(cwd)
  end

  return instances[cwd]
end

@ptn Would you care to also try printing the instances here in Repo.instance and check the output? While I doubt it would be a problem with slashes on OSX, I believe there is a possibility that the presence of multiple instances of the same git repo might be a cause to this bug.

akthe-at commented 1 month ago

@Shaobin-Jiang

Coincidentally I made that change at that same spot but with a line I took from somewhere else in the project cwd = vim.loop.cwd():gsub("^(%a):", "/%1"):gsub("/", "%%"):gsub(Path.path.sep, "%%")

I am trying to see if I can find a similar issue related to the .gitignore stuff.

However, that double instance and the mismatching table references would make sense if that was the cause.

CKolkey commented 1 month ago

Ok, give this a go: https://github.com/NeogitOrg/neogit/pull/1338

to tail the logs: tail -f ~/.cache/nvim/neogit.log

with env vars:

export NEOGIT_LOG_LEVEL=debug
export NEOGIT_LOG_FILE=true
export NEOGIT_DEBUG=true
akthe-at commented 1 month ago

@CKolkey this solves the status issue for staging/unstaging AND it solves the update issue related to adding an item to .gitignore! Do you still want logs if its all good?

CKolkey commented 1 month ago

Nope! Working means working.

Thanks everyone for the help pinpointing this.

ptn commented 1 month ago

~This fixed it for me too. Thanks everyone!~ Nope. I'll file a new issue when/if I have more info.

ptn commented 1 month ago

It was a problem with my auto-rooter, not neogit. My auto rooter code was detecting neogit's status buffer as being in dir A but the commit buffer being in B (a subdir of A). Neogit would correctly update the internal state of repo B, but since the status buffer is for repo A, it wouldn't get updated.

If someone is reading this in the future: if your status buffer is not refreshing correctly, log out what cwd and instances are in Repo.instance, file /Users/ptorres/.local/share/nvim/lazy/neogit/lua/neogit/lib/git/repository.lua.