Skip to content
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

bug(picker): The new git_stash picker fails on custom stash message #775

Closed
4 tasks done
aweis89 opened this issue Jan 28, 2025 · 3 comments · Fixed by #728
Closed
4 tasks done

bug(picker): The new git_stash picker fails on custom stash message #775

aweis89 opened this issue Jan 28, 2025 · 3 comments · Fixed by #728
Labels
bug Something isn't working

Comments

@aweis89
Copy link

aweis89 commented Jan 28, 2025

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.10.3

Operating system/version

15.2

Describe the bug

The current git_stash picker assumes no custom message is provided and relies on the default formatting of git stash when no message is provided.

However when running git stash -m "some message here" the stashes with the custom message isn't included. The issue seems to be related to this regex filter.

Steps To Reproduce

  • Run git checkout -b foo
  • Run git stash -m "foo bar" after making some change
  • Trigger the new Snacks git_stash picker

Expected Behavior

All stashes, including ones with custom messages should be included in the stash list

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/snacks.nvim", opts = {} },
    -- add any other plugins here
  },
})
@aweis89 aweis89 added the bug Something isn't working label Jan 28, 2025
@folke
Copy link
Owner

folke commented Jan 28, 2025

Can't reproduce using the provided steps. Are you using the latest version of snacks?

Image

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
@aweis89
Copy link
Author

aweis89 commented Jan 28, 2025

Can't reproduce using the provided steps. Are you using the latest version of snacks?

Image

Sorry, you need to be on a branch other than main to reproduce the issue

$ git checkout -b foo
$ git stash -m 'foo bar'
$ git stash list
stash@{0}: On foo: foo bar

The stash is not visible however using the latest snacks git_stash picker

@folke folke reopened this Jan 28, 2025
@folke folke closed this as completed in e960010 Jan 28, 2025
@folke
Copy link
Owner

folke commented Jan 28, 2025

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants