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.
A regresion was introduced by #81 where the log buffer was not being
restored when there was no modification after describing from the
log buffer. This has been reworked and now the function `on_done` is
always called not only when there are lines in the buffer giving the
responsibility to check the nilness on the `on_done` function.
There was a bug also when restoring cursor position which was being
wiped when the buffer was closed which is not actually what we want
- This required some improvements on the editor buffer logic,
introduced a `on_write` (previously on_done but it wasn't the
right meaning) hook and an `on_unload` to allow for both
describe and commit correct workflows.
- Introduced an utils function to extract the description text and
clean it post buffer write
- Refactor diff into modular architecture (native, diffview, codediff)
- Add the possibility for users to define their own diff backend
- Support external diff tools like diffview.nvim codediff.nvim
- Enable visual mode selection to diff two changes in log buffer
- Add summary tooltip integration with terminal
- Update documentation with new diff workflows
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
Adds the global option `describe.editor.type` to the exposed describe
command api, so it can be executed e.g. with:
`require("jj.cmd").describe(nil,nil,{with_status=false,type="input"})`
This allows having different types of describe commands invoked in a
single setting, without having to change the global plugin option.
Takes the same two option enums as the global variable, "buffer" or
"input". Is an optional field, which is given precedence to the older
order of setting the variable. That order remains the same.
remove push all method.
BREAKING CHANGE: handle_log_push_all renamed to handle_log_push_from_all
and now requires user to select a bookmark instead of pushing all.
- Add vim.ui.select prompt when revision has multiple bookmarks
- Include "[All]" option to push all bookmarks from a revision
- Squash: behaves like rebase, the user can select 1 or more
revisions to squash and then a destination
- Quick squash: `-r {rev} -u --ignore-immutable` flag from jj allowing
for quick visuall squashes
parsed as change-lines.
- Added some tests to avoid these false positives
- Forced the parser to ensure there is at least a symbol in the
change line allowed_prefixes before finding out the change
Changes add support for rebasing while ignoring immutability constraints with new keymaps (<S-CR>, <S-o>, <S-a>, <S-b>) and update documentation. Refactors rebase handler to accept optional ignore_immut parameter and includes minor comment improvements in buffer and command modules.
Now it is possible to rebase interactively from the log buffer with visual feedback. You can rebase one or many visually selected changes.
Supported target modes are: `-o` / `-A` / `-B`.
Limitation:
- As of now you cannot rebase a whole branch (-b) from the log view.
Bonus from this pr:
- Now keymaps support different modes
- Add `prefix` option to `bookmark_create()` function for setting default bookmark names
- Add `bookmark.prefix` configuration option for global bookmark prefix defaults
- Update README with bookmark prefix usage examples
When closing a terminal buffer (floating or regular), a race condition
could occur where the BufWipeout/BufDelete autocmd clears the buffer
reference, but the job's on_exit handler later tries to operate on it
via vim.schedule. This caused 'Invalid buffer' errors.
Add validity checks in both floating and regular buffer on_exit
handlers to safely handle the case where the buffer has already been
cleaned up.
Convert blocking jj commands to async using vim.fn.jobstart() to prevent UI
freezing during fetch, push, rebase, squash, and other heavy operations.
Changes:
- Implement execute_command_async() in runner with proper error handling
- Captures stdout from job and passes to success callback
- Supports stdin input for commands that require it
- Includes silent flag to suppress error notifications
- Replicates sync version's error handling behavior
- Convert blocking operations to async:
- handle_log_fetch, handle_log_push_all, handle_log_new
- handle_log_edit, handle_log_abandon, handle_log_describe
- describe.execute_describe, all init.lua commands
- Add push/fetch as public commands with CLI support:
- M.fetch() - fetch from remote
- M.push(opts) - push all changes or specific bookmark
- CLI: :J push, :J push <bookmark>, :J fetch
- Implement handle_log_push_bookmark() for revision under cursor:
- Retrieves and strips modified bookmark indicator (*)
- Pushes specific bookmark to remote
- Keybind: Shift+p in log buffer
- Update README with new keybinds:
- a: abandon revision under cursor
- f: fetch from remote
- p: push all changes
- Shift+p: push revision's bookmark
- Add Lua API docs for push command options
- Add close_on_edit option to close log buffer after editing a change (default: false)
- Rename handle_log_enter to handle_log_edit with close_on_exit parameter
- Update log keymaps to pass close_on_edit config to handlers
- Update config types and defaults in init.lua