fix(diff): revset must be shell-escaped (#53)

Co-authored-by: Julien Moutinho <julm+jj-nvim@sourcephile.fr>
This commit is contained in:
Julien M.
2025-12-18 22:48:01 -08:00
committed by GitHub
co-authored by Julien Moutinho
parent 1fd8faed4b
commit 868c3ce2e1
+1 -1
View File
@@ -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