Did you check docs and existing issues?
Neovim version (nvim -v)
v0.11.4
Operating system/version
macOS 15.6.1
Describe the bug
Installing a plugin with git v2.51.0 clones the plugin's repository with the new reftable refs format.
See [ANNOUNCE] Git v2.51.0 for more details.
lazy.nvim installs the plugin, but fails to fetch the logs of the plugin, and more importantly, generates an invalid lockfile (lazy-lock.json) containing only an opening brace ({)
The below error is shown after :Lazy syncing the first time:
~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/manage/lock.lua:29: commit is nil
|
commit = assert(info.commit, "commit is nil"), |
The below error is shown after closing and reopening :Lazy:
~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/manage/task/git.lua:90: branch '.invalid' not found
|
error(k .. " '" .. v .. "' not found") |
Workaround
Manually switch the refs format of the cloned plugin from reftable to the files format.
- Navigate to the directory where the plugin is cloned.
- Run
git fetch
git refs migrate --ref-format=files
Steps To Reproduce
- Update
git to v2.51.0 or greater
- Add a new plugin to the config
- Sync the config (
:Lazy sync)
Expected Behavior
lazy.nvim installs the plugin, is able to fetch the logs of the plugin, and generates a valid lockfile (lazy-lock.json).
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 = {
{
"Shatur/neovim-ayu",
opts = {},
config = function(_, opts)
local ayu = require("ayu")
ayu.setup(opts)
ayu.colorscheme()
end,
},
},
})
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.11.4
Operating system/version
macOS 15.6.1
Describe the bug
Installing a plugin with
git v2.51.0clones the plugin's repository with the newreftablerefs format.See [ANNOUNCE] Git v2.51.0 for more details.
lazy.nvim installs the plugin, but fails to fetch the logs of the plugin, and more importantly, generates an invalid lockfile (
lazy-lock.json) containing only an opening brace ({)The below error is shown after
:Lazy syncing the first time:lazy.nvim/lua/lazy/manage/lock.lua
Line 29 in 6c3bda4
The below error is shown after closing and reopening
:Lazy:lazy.nvim/lua/lazy/manage/task/git.lua
Line 90 in 6c3bda4
Workaround
Manually switch the refs format of the cloned plugin from
reftableto thefilesformat.Steps To Reproduce
gittov2.51.0or greater:Lazy sync)Expected Behavior
lazy.nvim installs the plugin, is able to fetch the logs of the plugin, and generates a valid lockfile (
lazy-lock.json).Repro