Skip to content

Commit fa5afad

Browse files
committed
fix(picker): file picker not respecting .gitignore
By default `fd` only respects global or local gitignore rules if searching inside a git repository. However in certain scenarios, e.g. when using jujutsu(https://github.com/jj-vcs/jj) instead of git, this approach never takes effect since it can't find a .git directory in cwd. The proposed `--no-require-git` flag allows `fd` to respect all git related ignore rules, regardless of whether it's searching inside a git repo or not.
1 parent f972ad7 commit fa5afad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/defaults.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ M.defaults.files = {
349349
"git", "-c", "color.status=false", "--no-optional-locks", "status", "--porcelain=v1" },
350350
find_opts = [[-type f \! -path '*/.git/*']],
351351
rg_opts = [[--color=never --files -g "!.git"]],
352-
fd_opts = [[--color=never --type f --type l --exclude .git]],
352+
fd_opts = [[--color=never --type f --type l --exclude .git --no-require-git]],
353353
dir_opts = [[/s/b/a:-d]],
354354
hidden = true,
355355
toggle_ignore_flag = "--no-ignore",

0 commit comments

Comments
 (0)