fix(picker): file picker not respecting .gitignore#2177
Merged
ibhagwan merged 1 commit intoibhagwan:mainfrom Jul 16, 2025
Merged
fix(picker): file picker not respecting .gitignore#2177ibhagwan merged 1 commit intoibhagwan:mainfrom
ibhagwan merged 1 commit intoibhagwan:mainfrom
Conversation
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.
Owner
|
Tyvm @amlanjlahkar for this thoughtful PR, seems this flag existed since fd v8.7 which is old enough, so this goes in :) https://github.com/sharkdp/fd/releases/tag/v8.7.0 |
Contributor
Author
|
From the release note you mentioned, this behaviour is confirmed for ripgrep as well and I guess it also should be the default for grepping in general |
Owner
We can add it to rg as well it it makes sense and is old enough to not cause issues with older rg versions. |
Owner
ibhagwan
added a commit
that referenced
this pull request
Jul 17, 2025
ibhagwan
added a commit
that referenced
this pull request
Jul 17, 2025
Contributor
Author
|
okay, no problem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By default
fdonly respects global or local gitignore rules if searching inside a git repository. However in certain scenarios, e.g. when using jujutsu instead of git, this approach never takes effect since it can't find a .git directory in cwd.The proposed
--no-require-gitflag allowsfdto respect all git related ignore rules, regardless of whether it's searching inside a git repo or not.I think it's safe to include this flag in default cmd.