Skip to content

Fix stash diff error by adding nil check for stash_id #1756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Aitai
Copy link
Contributor

@Aitai Aitai commented Jun 4, 2025

Closes #1713

I implemented the proposed fix from the issue to resolve the error that occurs when trying to show a diff on a stash item. The problem was in the diffview.lua file where it was trying to parse the stash name via the item_name variable, but the match function could return nil, causing concatenation to fail.

The fix adds a nil check for stash_id and provides a fallback to use item_name directly if no match is found, preventing the concatenation error when viewing stash diffs.

Copy link

@hoopoepg hoopoepg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message on stash d-d
2 participants