Skip to content

Error when trying to use git diff menu #2173

@AntonioJCosta

Description

@AntonioJCosta

Describe the bug

Hello. I tried to use git diff, and then the application crashed after some commands.

To Reproduce
Steps to reproduce the behavior:

  1. Open lazygit
  2. Go to Commits
  3. Select a commit
  4. Select any part of the code
  5. Press x
  6. Select open diff menu ...
  7. Select diff

After that, the application closes, and the following message appears on the terminal

2022/09/15 18:55:11 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*errors.errorString fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths

github.com/jesseduffield/lazygit/pkg/commands/oscommands/cmd_obj_runner.go:168 (0x56328a629b5b)
github.com/jesseduffield/lazygit/pkg/commands/oscommands/cmd_obj_runner.go:86 (0x56328a62934a)
github.com/jesseduffield/lazygit/pkg/commands/oscommands/cmd_obj_runner.go:76 (0x56328a62907b)
github.com/jesseduffield/lazygit/pkg/commands/git_cmd_obj_runner.go:21 (0x56328a65154c)
github.com/jesseduffield/lazygit/pkg/commands/oscommands/cmd_obj.go:161 (0x56328a62800f)
github.com/jesseduffield/lazygit/pkg/commands/git_commands/working_tree.go:292 (0x56328a64e594)
github.com/jesseduffield/lazygit/pkg/commands/patch/patch_manager.go:126 (0x56328a632083)
github.com/jesseduffield/lazygit/pkg/commands/patch/patch_manager.go:236 (0x56328a7173d4)
github.com/jesseduffield/lazygit/pkg/gui/line_by_line_panel.go:130 (0x56328a7173b9)
github.com/jesseduffield/lazygit/pkg/gui/line_by_line_panel.go:100 (0x56328a7170c5)
github.com/jesseduffield/lazygit/pkg/gui/line_by_line_panel.go:66 (0x56328a716d85)
github.com/jesseduffield/lazygit/pkg/gui/line_by_line_panel.go:264 (0x56328a717eee)
github.com/jesseduffield/lazygit/pkg/gui/line_by_line_panel.go:63 (0x56328a716d15)
github.com/jesseduffield/lazygit/pkg/gui/keybindings.go:931 (0x56328a7154bb)
github.com/jesseduffield/[email protected]/gui.go:1302 (0x56328a5e4519)
github.com/jesseduffield/[email protected]/gui.go:1270 (0x56328a5e4270)
github.com/jesseduffield/[email protected]/gui.go:1146 (0x56328a5e3671)
github.com/jesseduffield/[email protected]/gui.go:697 (0x56328a5e1d25)
github.com/jesseduffield/[email protected]/gui.go:657 (0x56328a5e1945)
github.com/jesseduffield/lazygit/pkg/gui/gui.go:619 (0x56328a706756)
github.com/jesseduffield/lazygit/pkg/gui/gui.go:625 (0x56328a706c05)
github.com/jesseduffield/lazygit/pkg/utils/utils.go:115 (0x56328a5f0407)
github.com/jesseduffield/lazygit/pkg/gui/gui.go:624 (0x56328a706b65)
github.com/jesseduffield/lazygit/pkg/app/app.go:217 (0x56328a736692)
github.com/jesseduffield/lazygit/pkg/app/app.go:217 (0x56328a736672)
github.com/jesseduffield/lazygit/main.go:154 (0x56328a744190)
runtime/proc.go:250 (0x56328a1317d3)
runtime/asm_amd64.s:1571 (0x56328a15f261)

Version info:
lazygit version: commit=v0.35, build date=2022-07-20T10:20:42Z, build source=binaryRelease, version=0.35, os=linux, arch=amd64
git version: git version 2.37.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions