From 58f93630a284bb1eed8053b34a818ff75e37b654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Joly?= Date: Tue, 13 Jun 2023 07:24:42 +0000 Subject: [PATCH] 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. --- lua/telescope/_extensions/repo/list.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/_extensions/repo/list.lua b/lua/telescope/_extensions/repo/list.lua index ee73a2c..efd46ca 100644 --- a/lua/telescope/_extensions/repo/list.lua +++ b/lua/telescope/_extensions/repo/list.lua @@ -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", "--no-ignore-vcs", "--case-sensitive", "--absolute-path" } + local find_repo_opts = { "--prune", "--hidden", "--no-ignore-vcs", "--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