-
|
Does ---@class fzf-lua.config.GitDiff: fzf-lua.config.GitBase
---@field ref? stringI feel it would be more useful to continue by default diffing against I've tried to hack it but the check for a valid commit hash doesn't accept this as I'm trying to send two commits hashes in the place of one: commits = {
actions = {
['alt-v'] = {
fn = function(selected, opts)
-- Copy the commit hash of the selected entry into a register,
-- then open the diff of the commit vs the parent commit
require('fzf-lua').actions.git_yank_commit(selected, opts)
local git_commit_to_show = vim.fn.getreg('*')
local git_commit_previous = git_commit_to_show .. "^"
require('fzf-lua').git_diff({ ref = git_commit_previous .. " " .. git_commit_to_show })
end
},
}
}All I want to achieve to to view the specific commit I'm looking at with Is this possible? If not, can I prepare a MR to add |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I’m sure it’s possible it’s a good use case, you’d probably need to modify the previewer too, if you wanna PR this you’re most welcome. |
Beta Was this translation helpful? Give feedback.
I’m sure it’s possible it’s a good use case, you’d probably need to modify the previewer too, if you wanna PR this you’re most welcome.