diff options
| author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2026-01-26 15:20:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-26 08:20:33 -0500 |
| commit | e6d955cb2c93c71cd6a2b27b19792e0745fb6049 (patch) | |
| tree | 752185d861c108de33e6429c067106709860f53d /runtime/lua/vim/pack.lua | |
| parent | d6a6078809b6f750140d84fa0537fbce6e1fa00f (diff) | |
| download | rneovim-e6d955cb2c93c71cd6a2b27b19792e0745fb6049.tar.gz rneovim-e6d955cb2c93c71cd6a2b27b19792e0745fb6049.tar.bz2 rneovim-e6d955cb2c93c71cd6a2b27b19792e0745fb6049.zip | |
docspack): mention re-install after source's default branch change #37560
Problem: `vim.pack.update()` doesn't update source's default branch if
it has changed on the remote. It can be done by executing
`git remote set-head origin --auto` for every plugin on every update,
but it feels like too much extra work (which requires Internet
connection) for a very rare use case.
This matters since `version = nil` will keep pointing to previous
default branch even after `vim.pack.update()`.
Solution: Document that in order for `version = nil` to point to the
source's new default branch, perform clean re-install.
Diffstat (limited to 'runtime/lua/vim/pack.lua')
| -rw-r--r-- | runtime/lua/vim/pack.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/pack.lua b/runtime/lua/vim/pack.lua index 9aabc91351..8ce951bde6 100644 --- a/runtime/lua/vim/pack.lua +++ b/runtime/lua/vim/pack.lua @@ -1210,6 +1210,9 @@ end --- --- Notes: --- - Every actual update is logged in "nvim-pack.log" file inside "log" |stdpath()|. +--- - It doesn't update source's default branch if it has changed (like from `master` to `main`). +--- To have `version = nil` point to a new default branch, re-install the plugin +--- (|vim.pack.del()| + |vim.pack.add()|). --- --- @param names? string[] List of plugin names to update. Must be managed --- by |vim.pack|, not necessarily already added to current session. |