From b075d0d2b6469e83bbfa7ede5483dbba041eadf4 Mon Sep 17 00:00:00 2001 From: Danilo Luvizotto Date: Fri, 12 Feb 2021 19:23:13 +0100 Subject: [PATCH] fix: git_commits when a commit has no message (#529) --- lua/telescope/make_entry.lua | 5 +++++ 1 file changed, 5 insertions(+) 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 = "" + end + return { value = sha, ordinal = sha .. ' ' .. msg,