Skip to content

Commit 58f9363

Browse files
committed
feat: speed up directory traversal with fd (list command)
This typically prevents going into the `.git` directory when matching on `.git`, thus making traversal faster.
1 parent a2f0367 commit 58f9363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/telescope/_extensions/repo/list.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ M.prepare_command = function(opts)
1717

1818
-- Don’t filter only on directories with fd as git worktrees actually have a
1919
-- .git file in them.
20-
local find_repo_opts = { "--hidden", "--no-ignore-vcs", "--case-sensitive", "--absolute-path" }
20+
local find_repo_opts = { "--prune", "--hidden", "--no-ignore-vcs", "--case-sensitive", "--absolute-path" }
2121
local find_user_opts = opts.fd_opts or {}
2222
local find_exec_opts = opts.fd_exec_opts or (function()
2323
if vim.fn.has("win32") == 1 or vim.fn.has("win64") == 1 then

0 commit comments

Comments
 (0)