diff options
| author | Brian Di Palma <1597820+briandipalma@users.noreply.github.com> | 2022-06-12 12:15:39 +0100 |
|---|---|---|
| committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2022-06-30 14:01:50 +0200 |
| commit | 3f1f5b7e5284b6c341429169e32161795def7e65 (patch) | |
| tree | 124f95debdbdc5cce3194e5f8e8b25cf9bccdd7f /lua | |
| parent | 6703c957e7d9a5dc5f91ceb59326ab7e05274642 (diff) | |
feat: add `--follow` to bcommits (#1997)
Yes the diff to parent preview will be blank but at the very least a user can follow a file around various moves and get access to the SHA-ID for the move.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/builtin/git.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 74b7df9..71203bb 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -112,7 +112,10 @@ 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" }) + local git_command = vim.F.if_nil( + opts.git_command, + { "git", "log", "--pretty=oneline", "--abbrev-commit", "--follow" } + ) pickers.new(opts, { prompt_title = "Git BCommits", |
