Skip to content

Commit

Permalink
feat: speed up directory traversal with fd (list command)
Browse files Browse the repository at this point in the history
This typically prevents going into the `.git` directory when matching on
`.git`, thus making traversal faster.
  • Loading branch information
cljoly committed Jun 13, 2023
1 parent 1cba00c commit 02a53c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/_extensions/repo/list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ M.prepare_command = function(opts)

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

0 comments on commit 02a53c0

Please sign in to comment.