ripgrep icon indicating copy to clipboard operation
ripgrep copied to clipboard

Add option to ignore nested git repositories

Open zaneduffield opened this issue 11 months ago • 2 comments

This implements the suggestion made in #23 to provide an option to ignore nested git repositories.

A nested git repository is identified by the presence of a .git file or directory. It's a directory in the regular case, but it's a file for git worktrees and git submodules.

This option is disabled by default.

I'm open to suggestions for better names for things. In particular I'm not sure about the name ignore_nested_git_repo used in IgnoreOptions and IgnoreBuilder because the concept of 'nesting' is outside of that layer; it has no knowledge of the level of a DirEntry and relies on the calling code to make sure that the level 0 directory is never ignored.

zaneduffield avatar Mar 09 '24 06:03 zaneduffield

I'm successfully using this in one of my repos with submodules. Thanks!

mvnetbiz avatar Jul 26 '24 02:07 mvnetbiz