refactor!: Migrate runners cmd from string to argv (#134)

Migrate command execution to structured argv lists across the plugin, replacing shell-string command construction with `vim.system` argv execution. The runner API now exposes argv-based execution as the default path:

   - `runner.execute_command` -> `runner.execute`
   - `runner.execute_command_async` -> `runner.execute_async`
   - `runner.execute_command_raw` -> `runner.execute_raw`
   - `runner.execute_command_raw_async` -> `runner.execute_raw_async`
   - `runner.execute_command_sync` was removed; use `runner.execute` and handle the result directly

BREAKING CHANGES:
   - `cmd.new({ args = ... })` now requires `args` as `string[]` argv tokens, not a single string.
   - `cmd.log({ ... })` now uses `raw_flags` as `string[]` for raw passthrough flags; `raw = "..."` is no longer supported.
   - Direct users of `jj.core.runner` must migrate from the old `execute_command*` string helpers to the new argv-based `execute*` helpers.
This commit is contained in:
Nicolas GB
2026-07-07 18:25:30 +02:00
committed by GitHub
parent c724290141
commit 7f2786ff16
17 changed files with 708 additions and 540 deletions
+4 -4
View File
@@ -163,8 +163,8 @@ function M.file_log_history(opts, log_lines)
return
end
local _, ok = runner.execute_command(
string.format("jj edit %s --ignore-immutable", item.rev),
local _, ok = runner.execute(
{ "jj", "edit", item.rev, "--ignore-immutable" },
string.format("could not edit revision '%s'", item.rev)
)
@@ -217,8 +217,8 @@ function M.conflict(opts, conflicts)
return
end
local _, ok = runner.execute_command(
string.format("jj edit %s", item.rev),
local _, ok = runner.execute(
{ "jj", "edit", item.rev, "--ignore-immutable" },
string.format("could not edit revision '%s'", item.rev)
)