NeogitOrg / neogit

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

Latest commit broke with `attempt to call field 'system' (a nil value)` #1295

Closed andradei closed 2 months ago

andradei commented 2 months ago

Description

The commit 16ee9ae957db2142fb189f5f2556123e24c5b7fb broke. Trying to run Neogit results in:

Error executing Lua callback: .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: Vim:Error executing Lua callback:
 ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:616: attempt to call field 'system' (a nil value)
stack traceback:
        ....local/share/nvim/lazy/neogit/lua/neogit/lib/git/cli.lua:616: in function 'git_root'
        /home/me/.local/share/nvim/lazy/neogit/lua/neogit.lua:86: in function 'construct_opts'
        /home/me/.local/share/nvim/lazy/neogit/lua/neogit.lua:164: in function 'open'
        ...me/.local/share/nvim/lazy/neogit/plugin/neogit.lua:5: in function <...me/.local/share/nvim/lazy/neogit/p
lugin/neogit.lua:3>
        [C]: in function 'cmd'
        .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/cor
e/handler/cmd.lua:16>
stack traceback:
        [C]: in function 'cmd'
        .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/cor
e/handler/cmd.lua:16>

:lua vim.system results in nil for me (see version below)

Neovim version

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1713773202

Operating system and version

Arch (EndeavourOS)

Steps to reproduce

  1. Run :Neogit

Expected behavior

Neogit opens

Actual behavior

Crash with the error on description.

Minimal config

Install via Lazy

{
    "NeogitOrg/neogit",
    cmd = "Neogit",
    dependencies = {
      "nvim-lua/plenary.nvim", -- required
      "sindrets/diffview.nvim", -- optional - Diff integration
      "nvim-telescope/telescope.nvim",
    },
    opts =  {},
}
arnawldo commented 2 months ago

I have the same issue.

NVIM v0.95 Neogit 9040f6f

milanglacier commented 2 months ago

This is because neogit merges nightly branch and support 0.10+ only.

I suggest create a stable branch for 0.9.5 users so that the user does not need to manully pin at a specific commit.

desdic commented 2 months ago

This is because neogit merges nightly branch and support 0.10+ only.

I suggest create a stable branch for 0.9.5 users so that the user does not need to manully pin at a specific commit.

The README states that its compatible with stable to

The master branch will always be compatible with the latest stable release of Neovim, and usually with the latest nightly build as well.
CKolkey commented 2 months ago

I made a tag for nvim 0.9 users: https://github.com/NeogitOrg/neogit/releases/tag/v0.0.1

HEAD follows the latest stable version of neovim, which is now 0.10 https://github.com/neovim/neovim/releases