-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global .ignore file #8300
Global .ignore file #8300
Conversation
book/src/configuration.md
Outdated
@@ -171,6 +171,7 @@ All git related options are only enabled in a git repository. | |||
|`deduplicate-links` | Ignore symlinks that point at files already shown in the picker | true | |||
|`parents` | Enables reading ignore files from parent directories | true | |||
|`ignore` | Enables reading `.ignore` files | true | |||
|`global-ignore` | Enables reading a global `.ignore` file from the same directory as the config.toml configuration | true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a feature flag? If the user doesn't have an ignore file then this feature is effectively disabled anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mentioned in the OP.
I considered just checking whether the file exists and adding it [...]
Should I switch to that approach?
Where should I put the info about the global .ignore? configuration.md or some place else?
BTW. Thanks for taking the time to look at this. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How's the current version?
This reverts commit 04a503d.
I somehow overlooked this comment in the docs
I should probably add the global ignore to the global search too then. An alternative approach would be adding a global ignore for each (e.g. |
Closing in favour of #8099 |
I was missing an option to use a global .ignore file to globally ignore (some) binary files. Some of those (e.g. images) might be checked into VCS, so the global git ignore is not helpful in that case.
I considered just checking whether the file exists and adding it but then switched to adding it to the config instead. The option could also be a path to the global .ignore.
A command to create such a default global .ignore could be added, but a follow-up PR would probably make more sense for that.