mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-05 18:56:13 +00:00
fix(diff): Correctly compare against @- instead of HEAD~1 when (#76)
This commit is contained in:
@@ -32,13 +32,11 @@ diff.register_backend("diffview", {
|
||||
end
|
||||
|
||||
-- Extract the commit id from opts.rev
|
||||
local commit_id = "HEAD~1"
|
||||
if opts.rev then
|
||||
local t_commit_id = utils.get_commit_id(opts.rev)
|
||||
if t_commit_id == nil then
|
||||
return
|
||||
end
|
||||
commit_id = t_commit_id
|
||||
local revset = opts.rev or "@-"
|
||||
|
||||
local commit_id = utils.get_commit_id(revset)
|
||||
if not commit_id then
|
||||
return
|
||||
end
|
||||
|
||||
vim.cmd(string.format("DiffviewOpen %s -- %%", commit_id))
|
||||
|
||||
Reference in New Issue
Block a user