refactor: restructure the whole plugin following a better separation of concers

This commit is contained in:
NicolasGB
2025-11-23 16:34:42 +01:00
committed by Nicolas GB
parent f6982a7716
commit e545d02ceb
11 changed files with 1237 additions and 1175 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
local utils = require("jj.utils")
local runner = require("jj.core.runner")
--- @class jj.picker
@@ -35,7 +36,7 @@ end
--- Gets the files in the current jj repository
--- @return jj.picker.file[]|nil A list of files with their changes or nil if not in a jj repo
local function get_files()
local diff_ouptut, ok = utils.execute_command("jj diff --summary --quiet")
local diff_ouptut, ok = runner.execute_command("jj diff --summary --quiet")
if not ok then
return
end
@@ -88,7 +89,7 @@ end
local function log_history(file_path)
local format =
"jj log %s -r 'all()' -T builtin_log_oneline --config 'template-aliases.\"format_timestamp(timestamp)\"=timestamp'"
local output, ok = utils.execute_command(string.format(format, file_path))
local output, ok = runner.execute_command(string.format(format, file_path))
if not ok then
return
end