From 868c3ce2e121530f618e08ee1464bfcfc64d43a0 Mon Sep 17 00:00:00 2001 From: "Julien M." Date: Fri, 19 Dec 2025 07:48:01 +0100 Subject: [PATCH] fix(diff): revset must be shell-escaped (#53) Co-authored-by: Julien Moutinho --- lua/jj/diff.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/jj/diff.lua b/lua/jj/diff.lua index 88a6cd2..f311939 100644 --- a/lua/jj/diff.lua +++ b/lua/jj/diff.lua @@ -8,7 +8,7 @@ local utils = require("jj.utils") --- @param path string The file path --- @return table lines The file content local function get_file_content(rev, path) - local cmd = string.format("jj file show -r %s %s", rev, vim.fn.shellescape(path)) + local cmd = string.format("jj file show -r %s %s", vim.fn.shellescape(rev), vim.fn.shellescape(path)) local content = vim.fn.system(cmd) local success = vim.v.shell_error == 0 if success then