From 578c5f15dfaeca9841dee85e44001216376bb9ca Mon Sep 17 00:00:00 2001 From: NicolasGB Date: Sat, 4 Apr 2026 15:45:19 +0200 Subject: [PATCH] feat(diff): Now diff command supports `..` format --- lua/jj/cmd/init.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lua/jj/cmd/init.lua b/lua/jj/cmd/init.lua index b1bdf69..62c17b7 100644 --- a/lua/jj/cmd/init.lua +++ b/lua/jj/cmd/init.lua @@ -1254,7 +1254,20 @@ function M.j(args) require("jj.cmd.split").split(opts) end, diff = function() - M.diff({ current = false }) + if remaining_args_str == "" then + M.diff({ current = false }) + else + local parts = parser.parse_diff_range(remaining_args_str) + utils.notify(vim.inspect(parts)) + if parts then + require("jj.diff").diff_revisions({ left = parts.left, right = parts.right }) + else + utils.notify( + "Invalid diff range. Format must be `..` or `...`", + vim.log.levels.ERROR + ) + end + end end, diff_history = function() if remaining_args_str == "" then