Skip to content

Commit 161faf3

Browse files
committed
chore: shorten minutes to min in commit window
1 parent 295f0ef commit 161faf3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/tinygit/commands/commit/preview.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ function M.getGitLog()
5959
local loglines = require("tinygit.config").config.commit.preview.loglines
6060
local args = { "git", "log", "--max-count=" .. loglines, "--format=%s (%cr)" }
6161
local lines = vim.split(u.syncShellCmd(args), "\n")
62+
63+
-- shorten `minutes` to `min`
64+
lines = vim.tbl_map(function(l) return l:gsub(" minutes? ago%)$", " min ago)") end, lines)
65+
6266
return lines
6367
end
6468

0 commit comments

Comments
 (0)