From 0fadb5e1cec709de839ecd6937b338b9201734ad Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 31 Dec 2022 16:08:01 +0100 Subject: [PATCH] feat(ui): when updating to a new version, show the version instead of the commit refs --- lua/lazy/view/render.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index d57e504..c9824ab 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -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