From 9d12cdcc0624c8a7f3c7c89f87abf992bc6c217e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 20 Dec 2022 19:58:48 +0100 Subject: [PATCH] fix(git): don't run git log for submodules. Fixes #33 --- lua/lazy/manage/task/git.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index 90ba2b10..4ac30584 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -12,7 +12,8 @@ M.log = { if opts.updated and not (plugin._.updated and plugin._.updated.from ~= plugin._.updated.to) then return true end - return not Util.file_exists(plugin.dir .. "/.git") + local stat = vim.loop.fs_stat(plugin.dir .. "/.git") + return stat and stat.type ~= "directory" end, ---@param opts {args?: string[], updated?:boolean, check?:boolean} run = function(self, opts)