summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
authorDanilo Luvizotto <danilo.luvizotto@gmail.com>2021-02-12 19:23:13 +0100
committerGitHub <noreply@github.com>2021-02-12 19:23:13 +0100
commitb075d0d2b6469e83bbfa7ede5483dbba041eadf4 (patch)
tree244d7b52618a3cd5d200cbf1709c83cbc08e03cc /lua/telescope/make_entry.lua
parent3a7fa41857394cd2d90d00891413c12fada039c3 (diff)
fix: git_commits when a commit has no message (#529)
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index 4c0696f..bd1f622 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -297,6 +297,11 @@ function make_entry.gen_from_git_commits()
local sha, msg = string.match(entry, '([^ ]+) (.+)')
+ if not msg then
+ sha = entry
+ msg = "<empty commit message>"
+ end
+
return {
value = sha,
ordinal = sha .. ' ' .. msg,