fix(git): don't run git log for submodules. Fixes #33

This commit is contained in:
Folke Lemaitre 2022-12-20 19:58:48 +01:00
parent 06ffcf5874
commit 9d12cdcc06
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 1 deletions

View File

@ -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)