mirror of https://github.com/folke/lazy.nvim.git
feat(ui): when updating to a new version, show the version instead of the commit refs
This commit is contained in:
parent
34e2c78e06
commit
0fadb5e1ce
|
@ -340,11 +340,18 @@ function M:diagnostics(plugin)
|
||||||
self:diagnostic({
|
self:diagnostic({
|
||||||
message = "already up to date",
|
message = "already up to date",
|
||||||
})
|
})
|
||||||
|
else
|
||||||
|
local version = Git.info(plugin.dir, true).version
|
||||||
|
if version then
|
||||||
|
self:diagnostic({
|
||||||
|
message = "updated to " .. tostring(version),
|
||||||
|
})
|
||||||
else
|
else
|
||||||
self:diagnostic({
|
self:diagnostic({
|
||||||
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7),
|
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7),
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
elseif plugin._.updates then
|
elseif plugin._.updates then
|
||||||
local version = plugin._.updates.to.version
|
local version = plugin._.updates.to.version
|
||||||
if version then
|
if version then
|
||||||
|
|
Loading…
Reference in New Issue