Skip to content

Commit

Permalink
fix(telescope): displaying worktrees when loading telescope
Browse files Browse the repository at this point in the history
  ## what
  - displaying worktrees when loading telescope

  ## how
  - check
    - ThePrimeagen#122
    - ThePrimeagen#124

  ## why
  - telescope 0.1.5 breaks the code when listing available git worktress

  ## where
  - ./lua/telescope/_extensions/git_worktree.lua

  ## usage

  ## commit id, issue or pull request

  ## notes
  • Loading branch information
Clumsy-Coder committed Dec 2, 2024
1 parent 3df2979 commit 74681dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/telescope/_extensions/git_worktree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,14 @@ local telescope_git_worktree = function(opts)
}

local make_display = function(entry)
-- telescope 0.1.5 causes the break when listing available git worktrees
--
-- applying changes from
-- https://github.com/ThePrimeagen/git-worktree.nvim/issues/122
local path, _ = utils.transform_path(opts, entry.path)
return displayer {
{ entry.branch, "TelescopeResultsIdentifier" },
{ utils.transform_path(opts, entry.path) },
{ path },
{ entry.sha },
}
end
Expand Down

0 comments on commit 74681dd

Please sign in to comment.