mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-05 10:46:08 +00:00
feat(tag): Implement set/delete/push (push only colocated repistories) (#84)
This commit is contained in:
@@ -582,6 +582,19 @@ function M.handle_log_push_bookmark()
|
||||
end
|
||||
end
|
||||
|
||||
--- Handle seting a tag from `jj log` buffer for the revision under cursor
|
||||
--- @param revset? string Revset to set the tag on, if not provided it will do nothing.
|
||||
function M.handle_log_tag_set(revset)
|
||||
if not revset or revset == "" then
|
||||
revset = revset or get_revset()
|
||||
if not revset or revset == "" then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
require("jj.cmd").tag_set(revset)
|
||||
end
|
||||
|
||||
--- Handle opening a PR/MR from `jj log` buffer for the revision under cursor
|
||||
--- @param list_bookmarks? boolean If true, prompt to select from all bookmarks instead of using current revision
|
||||
function M.handle_log_open_pr(list_bookmarks)
|
||||
@@ -1032,6 +1045,11 @@ function M.log_keymaps()
|
||||
handler = M.handle_log_split,
|
||||
modes = { "n" },
|
||||
},
|
||||
tag_set = {
|
||||
desc = "Set a tag under the current revset",
|
||||
handler = M.handle_log_tag_set,
|
||||
modes = { "n" },
|
||||
},
|
||||
}
|
||||
|
||||
return cmd.merge_keymaps(cmd.resolve_keymaps_from_specs(keymaps, specs), cmd.terminal_keymaps())
|
||||
|
||||
Reference in New Issue
Block a user