feat: Add git builtins (#240)

Conni2461 is a great coder and contributor :)
This commit is contained in:
Simon Hauser
2020-11-16 15:10:26 -05:00
committed by GitHub
parent c01b7ad024
commit 8117263027
5 changed files with 241 additions and 33 deletions
+19 -1
View File
@@ -134,7 +134,7 @@ do
end
local execute_keys = {
path = function(t)
path = function(t)
return t.cwd .. path.separator .. t.filename, false
end,
@@ -215,6 +215,24 @@ do
end
end
function make_entry.gen_from_git_commits(opts)
opts = opts or {}
return function(entry)
if entry == "" then
return nil
end
local sha, msg = string.match(entry, '([^ ]+) (.+)')
return {
value = sha,
ordinal = sha .. ' ' .. msg,
display = sha .. ' ' .. msg,
}
end
end
function make_entry.gen_from_quickfix(opts)
opts = opts or {}
opts.tail_path = get_default(opts.tail_path, true)