Skip to content

Error message on stash d-d #1713

Open
@hoopoepg

Description

@hoopoepg

Description

get error message when trying to show diff on stash item
steps to reproduce:

  • open Neogit tab
  • unfold stash list
  • select any stash
  • type d d (diff this)
  • error message appears

it seems issue in file lua/neogit/integrations/diffview.lua:129
it is trying to get stash name via parsing item_name variable, but instead of stash description parameter item_name includes value of hash-commit and match function returns empty string (that's why concatenation fails and error message appears).

proposed fix: update line

view = dv_lib.diffview_open(dv_utils.tbl_pack(stash_id .. "^!"))
to

    view = dv_lib.diffview_open(dv_utils.tbl_pack(stash_id and stash_id .. "^!" or item_name))

Neovim version

NVIM v0.11.0
build type: release
LuaJIT 2.1.1241730670

git 2.49.0

Operating system and version

Linux Ubuntu 20.04

Steps to reproduce

steps to reproduce:

  • open Neogit tab
  • unfold stash list
  • select any stash
  • type d d (diff this)
  • error message appears

Expected behavior

show diff

Actual behavior

concatenation error appears

Minimal config

not sure about config, just installed plugin via Lazy as described on welcome Neogit page

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions