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: ENAMETOOLONG error with long git branch names #179

Open
2 tasks done
Drew-Daniels opened this issue Oct 21, 2024 · 0 comments
Open
2 tasks done

bug: ENAMETOOLONG error with long git branch names #179

Drew-Daniels opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Drew-Daniels
Copy link

Did you check docs and existing issues?

  • I have read the Grapple docs
  • I have searched the existing issues of Grapple

Neovim version (nvim -v)

NVIM v0.10.2

Operating system/version

MacOS 15.0.1

Describe the bug

Thanks so much for making this plugin. I use this daily and it's been massively helpful for my development workflow.

This is the only time I've ever had an issue using grapple.nvim and it's definitely an edge case, but I use "git_branch" as my scope, and I noticed an issue today when using a particularly long branch name: fix/EMR-21468/care-summary-model-selected-date-is-getting-reset-when-user-select-the-location-from-location-drop-down-for-transfer-and-add-location-encounters-on-multiple-locations

Pasted Graphic 8

Steps To Reproduce

  1. Install grapple.nvim using your plugin manager
  2. Configure grapple with scope = "git_branch"
  3. In a git-tracked repo, create a branch with a really long name
  • My example is 181 characters long (git rev-parse --abbrev-ref HEAD | wc -c)
  1. Run :Grapple tag with a buffer for a file in that repository open
  2. See you get an ENAMETOOLONG error

Expected Behavior

I would expect that grapple.nvim would allow me to continue using git_branch as scope even with really long git branch names. Maybe this is a limitation of some underlying way that scopes are managed with grapple.nvim, but getting this error was a little unexpected because I've been able to use git_branch scope without issues until today/with this branch.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "cbochs/grapple.nvim"
  -- add any other plugins here
}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})
@Drew-Daniels Drew-Daniels added the bug Something isn't working label Oct 21, 2024
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

No branches or pull requests

1 participant