mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-15 23:53:18 +00:00
feat(log): Add summary view (#70)
Display a summary of changed files for any revision in the log buffer using a floating tooltip. From the tooltip, users can diff or edit specific files directly. - Add summary tooltip triggered by <S-k> in log buffer - Integrate tooltip as stateful component of terminal - Make summary keymaps configurable - Add documentation and demo gif
This commit is contained in:
@@ -256,4 +256,22 @@ function M.open_pr_for_bookmark(bookmark)
|
||||
end)
|
||||
end
|
||||
|
||||
--- Check if a given revset represents an immutable change
|
||||
--- @param revset string The revset to check
|
||||
--- @return boolean True if the change is immutable, false otherwise
|
||||
function M.is_change_immutable(revset)
|
||||
local output, success = runner.execute_command(
|
||||
string.format("jj log --no-graph -r '%s' -T 'immutable'", revset),
|
||||
"Error checking change immutability",
|
||||
nil,
|
||||
true
|
||||
)
|
||||
|
||||
if not success or not output then
|
||||
return false
|
||||
end
|
||||
|
||||
return vim.trim(output) == "true"
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user