Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions lua/telescope/_extensions/git_worktree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,14 @@ local delete_worktree = function(prompt_bufnr)
local worktree_path = get_worktree_path(prompt_bufnr)
actions.close(prompt_bufnr)
if worktree_path ~= nil then
git_worktree.delete_worktree(worktree_path, force_next_deletion, {
on_failure = delete_failure_handler,
on_success = delete_success_handler
})
git_worktree.delete_worktree(worktree_path, force_next_deletion, {
on_failure = delete_failure_handler,
on_success = delete_success_handler
})
end
end

local create_input_prompt = function(cb)

--[[
local window = Window.centered({
width = 30,
Expand Down Expand Up @@ -143,7 +142,7 @@ end

local telescope_git_worktree = function(opts)
opts = opts or {}
local output = utils.get_os_command_output({"git", "worktree", "list"})
local output = utils.get_os_command_output({ "git", "worktree", "list" })
local results = {}
local widths = {
path = 0,
Expand Down Expand Up @@ -194,9 +193,9 @@ local telescope_git_worktree = function(opts)

local make_display = function(entry)
return displayer {
{ entry.branch, "TelescopeResultsIdentifier" },
{ utils.transform_path(opts, entry.path) },
{ entry.sha },
{ entry.branch, "TelescopeResultsIdentifier" },
{ utils.transform_path(opts, entry.path), "TelescopeResultsIdentifier" },
{ entry.sha, "TelescopeResultsIdentifier" },
}
end

Expand Down Expand Up @@ -226,7 +225,7 @@ local telescope_git_worktree = function(opts)
end

return require("telescope").register_extension(
{
{
exports = {
git_worktree = telescope_git_worktree,
git_worktrees = telescope_git_worktree,
Expand Down