diff --git a/lua/telescope/builtin/__git.lua b/lua/telescope/builtin/__git.lua index 538d99c391..a4a306d414 100644 --- a/lua/telescope/builtin/__git.lua +++ b/lua/telescope/builtin/__git.lua @@ -66,8 +66,10 @@ end git.commits = function(opts) opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_git_commits(opts)) - opts.git_command = - vim.F.if_nil(opts.git_command, git_command({ "log", "--pretty=oneline", "--abbrev-commit", "--", "." }, opts)) + opts.git_command = vim.F.if_nil( + opts.git_command, + git_command({ "log", "--pretty=oneline", opts.branch, "--abbrev-commit", "--", "." }, opts) + ) pickers .new(opts, {