fix(git): mark local plugins as needing updates only if local is behind upstream

This commit is contained in:
AThePeanut4 2024-07-07 16:29:12 +02:00
commit 29aae56bc1
No known key found for this signature in database
GPG key ID: 52218D91FC13009D
2 changed files with 24 additions and 10 deletions

View file

@ -35,7 +35,9 @@ end
function M.fast_check(opts)
opts = opts or {}
for _, plugin in pairs(Config.plugins) do
if not plugin.pin and not plugin.dev and plugin._.installed then
-- don't check local plugins here, since we mark them as needing updates
-- only if local is behind upstream (if the git log task gives no output)
if plugin._.installed and not (plugin.pin or plugin._.is_local) then
plugin._.updates = nil
local info = Git.info(plugin.dir)
local ok, target = pcall(Git.get_target, plugin)