mirror of https://github.com/folke/lazy.nvim.git
fix(checker): allow git checks only for non-pinned plugins (#61)
This commit is contained in:
parent
57bea32e4f
commit
a939243639
|
@ -16,7 +16,7 @@ end
|
||||||
|
|
||||||
function M.fast_check()
|
function M.fast_check()
|
||||||
for _, plugin in pairs(Config.plugins) do
|
for _, plugin in pairs(Config.plugins) do
|
||||||
if plugin._.installed then
|
if not plugin.pin and plugin._.installed then
|
||||||
plugin._.has_updates = nil
|
plugin._.has_updates = nil
|
||||||
local info = Git.info(plugin.dir)
|
local info = Git.info(plugin.dir)
|
||||||
local ok, target = pcall(Git.get_target, plugin)
|
local ok, target = pcall(Git.get_target, plugin)
|
||||||
|
|
|
@ -8,6 +8,9 @@ local M = {}
|
||||||
M.log = {
|
M.log = {
|
||||||
---@param opts {updated?:boolean, check?: boolean}
|
---@param opts {updated?:boolean, check?: boolean}
|
||||||
skip = function(plugin, opts)
|
skip = function(plugin, opts)
|
||||||
|
if opts.check and plugin.pin then
|
||||||
|
return true
|
||||||
|
end
|
||||||
if opts.updated and not (plugin._.updated and plugin._.updated.from ~= plugin._.updated.to) then
|
if opts.updated and not (plugin._.updated and plugin._.updated.from ~= plugin._.updated.to) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue