feat(git): git_commits shows the current branch graph (#2288)
Co-authored-by: Cyan Joeng <cyan.joeng@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@ end
|
||||
|
||||
git.commits = function(opts)
|
||||
opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_git_commits(opts))
|
||||
local git_command = vim.F.if_nil(opts.git_command, { "git", "log", "--pretty=oneline", "--abbrev-commit", "--", "." })
|
||||
local git_command = vim.F.if_nil(opts.git_command, { "git", "log", "--graph", "--oneline", "--decorate", "--", "." })
|
||||
|
||||
pickers
|
||||
.new(opts, {
|
||||
@@ -115,8 +115,7 @@ git.bcommits = function(opts)
|
||||
opts.current_line = (opts.current_file == nil) and get_current_buf_line(opts.winnr) or nil
|
||||
opts.current_file = vim.F.if_nil(opts.current_file, vim.api.nvim_buf_get_name(opts.bufnr))
|
||||
opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_git_commits(opts))
|
||||
local git_command =
|
||||
vim.F.if_nil(opts.git_command, { "git", "log", "--pretty=oneline", "--abbrev-commit", "--follow" })
|
||||
local git_command = vim.F.if_nil(opts.git_command, { "git", "log", "--graph", "--oneline", "--decorate", "--follow" })
|
||||
|
||||
pickers
|
||||
.new(opts, {
|
||||
|
||||
Reference in New Issue
Block a user