Skip to content
Myr

feat: add --ignore-parent option to override --no-ignore-parent

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Add the --ignore-parent flag, mirroring the existing pattern where --ignore-vcs overrides --no-ignore-vcs. This lets users undo --no-ignore-parent in aliases or config files. Closes #1958

authored by Trevin Chow · committed by Trevin Chow · parent a665a3b · Browse files · 2 files+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−0 removed

  • other:+8 added−0 removed

2 files+8 added−0 removed

modified:src/cli.rs+5 added
100 unmodified lines
101 require_git: (),102103 /// Show search results from files and directories that would otherwise be104 /// ignored by '.gitignore', '.ignore', or '.fdignore' files in parent directories.105 /// The flag can be overridden with --ignore-parent.106 #[arg(107 long,108 hide_short_help = true,109 help = "Do not respect .(git|fd)ignore files in parent directories",110 long_help111 )]112 pub no_ignore_parent: bool,113114 /// Overrides --no-ignore-parent115 #[arg(long, overrides_with = "no_ignore_parent", hide = true, action = ArgAction::SetTrue)]116 ignore_parent: (),117118 /// Do not respect the global ignore file119 #[arg(long, hide = true)]120 pub no_global_ignore_file: bool,121
832 unmodified lines
modified:CHANGELOG.md+3 added
1# Unreleased23## Features4- Add `--ignore-parent` option to override `--no-ignore-parent`, see #1958 (@tmchow)56## Bugfixes7- Handle invalid working directories gracefully when using `--full-path`, see #1900 (@Xavrir).89# 10.4.2
848 unmodified lines