sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

Diffview causing plenary error #314

Closed Sammo98 closed 1 year ago

Sammo98 commented 1 year ago

NVIM v0.9.0

Installation:

use('nvim-lua/plenary.nvim')
use('sindrets/diffview.nvim')

When running DiffviewOpen, the following error and traceback occurs:

Error executing Lua callback: .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:405: Failed to spawn process: {
  _additional_on_exit_callbacks = {},
  _raw_cwd = "--path-format=absolute",
  _shutdown_check = <userdata 1>,
  _stderr_results = {},
  _stdout_results = {},
  _user_on_stderr = <function 1>,
  args = { "rev-parse", "--path-format=absolute", "--git-dir" },
  command = "git",
  enable_handlers = true,
  enable_recording = true,
  interactive = true,
  pid = "ENOENT: no such file or directory",
  stderr = <userdata 2>,
  stdin = <userdata 3>,
  stdout = <userdata 4>,
  user_data = {},
  <metatable> = <1>{
    __index = <table 1>,
    _create_uv_options = <function 2>,
    _execute = <function 3>,
    _pipes_are_closed = <function 4>,
    _prepare_pipes = <function 5>,
    _reset = <function 6>,
    _shutdown = <function 7>,
    _stop = <function 8>,
    add_on_exit_callback = <function 9>,
    after = <function 10>,
    after_failure = <function 11>,
    after_success = <function 12>,
    and_then = <function 13>,
    and_then_on_failure = <function 14>,
    and_then_on_failure_wrap = <function 15>,
    and_then_on_success = <function 16>,
    and_then_on_success_wrap = <function 17>,
    and_then_wrap = <function 18>,
    chain = <function 19>,
    chain_status = <function 20>,
    co_wait = <function 21>,
    is_job = <function 22>,
    join = <function 23>,
    new = <function 24>,
    pid = <function 25>,
    result = <function 26>,
    send = <function 27>,
    shutdown = <function 28>,
    start = <function 29>,
    stderr_result = <function 30>,
    sync = <function 31>,
    wait = <function 32>
  }
}

stack traceback:
        .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:405: in function '_execute'
        .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:448: in function 'start'
        .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:452: in function 'sync'
        ...e/pack/packer/start/diffview.nvim/lua/diffview/utils.lua:451: in function 'exec_sync'
        ...art/diffview.nvim/lua/diffview/vcs/adapters/git/init.lua:254: in function 'get_dir'
        ...art/diffview.nvim/lua/diffview/vcs/adapters/git/init.lua:230: in function 'init'
        ...ite/pack/packer/start/diffview.nvim/lua/diffview/oop.lua:58: in function 'GitAdapter'
        ...art/diffview.nvim/lua/diffview/vcs/adapters/git/init.lua:200: in function 'get_adapter'
        ...ite/pack/packer/start/diffview.nvim/lua/diffview/lib.lua:29: in function 'diffview_open'
        ...te/pack/packer/start/diffview.nvim/lua/diffview/init.lua:113: in function 'open'
        ...site/pack/packer/start/diffview.nvim/plugin/diffview.lua:24: in function <...site/pack/packer/start/diffview.nvim/plugin/diffview.lua:23>
stack traceback:
        [C]: in function 'error'
        .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:405: in function '_execute'
        .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:448: in function 'start'
        .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:452: in function 'sync'
        ...e/pack/packer/start/diffview.nvim/lua/diffview/utils.lua:451: in function 'exec_sync'
        ...art/diffview.nvim/lua/diffview/vcs/adapters/git/init.lua:254: in function 'get_dir'
        ...art/diffview.nvim/lua/diffview/vcs/adapters/git/init.lua:230: in function 'init'
        ...ite/pack/packer/start/diffview.nvim/lua/diffview/oop.lua:58: in function 'GitAdapter'
        ...art/diffview.nvim/lua/diffview/vcs/adapters/git/init.lua:200: in function 'get_adapter'
        ...ite/pack/packer/start/diffview.nvim/lua/diffview/lib.lua:29: in function 'diffview_open'
        ...te/pack/packer/start/diffview.nvim/lua/diffview/init.lua:113: in function 'open'
        ...site/pack/packer/start/diffview.nvim/plugin/diffview.lua:24: in function <...site/pack/packer/start/diffview.nvim/plugin/diffview.lua:23>
sindrets commented 1 year ago

You have an outdated git installation.

Closing as duplicate of #165.