fix(git): properly compare git commits with short refs

This commit is contained in:
Folke Lemaitre 2023-01-03 09:36:35 +01:00
parent 3ad6d95a30
commit dc9c92a9b3
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 11 additions and 3 deletions

View file

@ -22,7 +22,7 @@ function M.fast_check(opts)
plugin._.updates = nil
local info = Git.info(plugin.dir)
local ok, target = pcall(Git.get_target, plugin)
if ok and info and target and info.commit ~= target.commit then
if ok and info and target and not Git.eq(info, target) then
plugin._.updates = { from = info, to = target }
end
end