feat(split): add jj split command with interactive floating terminal

Add split command that allows splitting a change into multiple revisions
    from the log buffer or via :J split. Supports --parallel, --message,
    --fileset, and --ignore-immutable flags. Includes immutability checks
    with user confirmation and empty change detection.
This commit is contained in:
NicolasGB
2026-02-13 18:44:27 +01:00
committed by Nicolas GB
parent 3115a0b3f0
commit 3d78c28f7e
6 changed files with 325 additions and 44 deletions
+18
View File
@@ -307,6 +307,24 @@ function M.is_change_immutable(revset)
return vim.trim(output) == "true"
end
--- Check if a given revset is empty
--- @param revset string The revset to check
--- @return boolean True if the revset is empty, false otherwise
function M.is_change_empty(revset)
local output, success = runner.execute_command(
string.format("jj log --no-graph -r '%s' -T 'empty' --quiet", revset),
"Error checking if revset is empty",
nil,
true
)
if not success or not output then
return false
end
return vim.trim(output) == "true"
end
--- Build describe text for a given revision
--- @param revset? string The revision to describe (default: @)
--- @return string[]|nil