Skip to content

Commit

Permalink
Fix logic for when to read global ignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed Dec 17, 2022
1 parent addf00c commit 5a4d57a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## Bugfixes

- Fix logic for when to use global ignore file. There was a bug where the only case where the
global ignore file wasn't processed was if `--no-ignore` was passed, but neither `--unrestricted`
nor `--no-global-ignore-file` is passed. See #1209

## Changes

## Other
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn construct_config(mut opts: Opts, pattern_regexps: &[String]) -> Result<Config
read_fdignore: !(opts.no_ignore || opts.rg_alias_ignore()),
read_vcsignore: !(opts.no_ignore || opts.rg_alias_ignore() || opts.no_ignore_vcs),
read_parent_ignore: !opts.no_ignore_parent,
read_global_ignore: !opts.no_ignore || opts.rg_alias_ignore() || opts.no_global_ignore_file,
read_global_ignore: !(opts.no_ignore || opts.rg_alias_ignore() || opts.no_global_ignore_file),
follow_links: opts.follow,
one_file_system: opts.one_file_system,
null_separator: opts.null_separator,
Expand Down

0 comments on commit 5a4d57a

Please sign in to comment.