feat(diff): Add the diff_history command (#97)

This new command is natively implemented by both the `codediff` and `diffview` backends allowing to easily navigate the changes between two revsets while diffing the. 

It also gives a new `:J diff_hisotyr` command that optionally takes a range of revsets formatted `<rev1>..<rev2>` otherwise it prompts the user for the range.
This commit is contained in:
Nicolas GB
2026-03-12 18:03:23 +01:00
committed by GitHub
parent ec44937e1b
commit 1c3d38a626
8 changed files with 184 additions and 3 deletions
+16
View File
@@ -229,4 +229,20 @@ function M.parse_annotation_line(line)
return result
end
-- Given a range with the format "left..right", parse and return the two revisions
--- @param range_str string The range string to parse (e.g., "left..right")
--- @return {left: string, right: string}|nil A table
function M.parse_diff_range(range_str)
if not range_str then
return nil
end
local left, right = range_str:match("^(%S+)%.%.(%S+)$")
if left and right then
return { left = left, right = right }
end
return nil
end
return M