Skip to content

Commit

Permalink
feat(ui): when updating to a new version, show the version instead of…
Browse files Browse the repository at this point in the history
… the commit refs
  • Loading branch information
folke committed Dec 31, 2022
1 parent 34e2c78 commit 0fadb5e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lua/lazy/view/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,16 @@ function M:diagnostics(plugin)
message = "already up to date",
})
else
self:diagnostic({
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7),
})
local version = Git.info(plugin.dir, true).version
if version then
self:diagnostic({
message = "updated to " .. tostring(version),
})
else
self:diagnostic({
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7),
})
end
end
elseif plugin._.updates then
local version = plugin._.updates.to.version
Expand Down

0 comments on commit 0fadb5e

Please sign in to comment.