diff options
| author | Danilo Luvizotto <danilo.luvizotto@gmail.com> | 2021-02-12 19:23:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 19:23:13 +0100 |
| commit | b075d0d2b6469e83bbfa7ede5483dbba041eadf4 (patch) | |
| tree | 244d7b52618a3cd5d200cbf1709c83cbc08e03cc /lua/telescope/make_entry.lua | |
| parent | 3a7fa41857394cd2d90d00891413c12fada039c3 (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.lua | 5 |
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, |
