feat(git): navigate any git object from cat-file headers
This commit is contained in:
+7
-1
@@ -119,7 +119,13 @@ local function run_in_split(worktree, args, conf)
|
||||
vim.b[buf].git_parent_ref =
|
||||
repo.rev_parse(worktree, user_ref .. "^", true)
|
||||
end
|
||||
pcall(vim.api.nvim_buf_set_name, buf, "git://" .. (sha or user_ref))
|
||||
-- Per-subcommand scheme so `:G show <sha>` doesn't collide with
|
||||
-- the cat-file URI form `git://<sha>` used by the gitlog flow.
|
||||
pcall(
|
||||
vim.api.nvim_buf_set_name,
|
||||
buf,
|
||||
"git" .. args[1] .. "://" .. (sha or user_ref)
|
||||
)
|
||||
vim.bo[buf].filetype = conf.ft
|
||||
else
|
||||
vim.bo[buf].filetype = conf.ft
|
||||
|
||||
Reference in New Issue
Block a user