diff options
author | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 14:43:22 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 17:16:28 -0500 |
commit | 711426a632aee0affb7009cd8e3492c4ff7273e8 (patch) | |
tree | c208b97d618f7867a55171fb2d7c2928a6ccfe37 /ci | |
parent | 01eeec56bb0a67dd402aed0f5650525076b26657 (diff) |
cli: add --no-require-git flag
This flag prevents ripgrep from requiring one to search a git repository
in order to respect git-related ignore rules (global, .gitignore and
local excludes). This actually corresponds to behavior ripgrep had long
ago, but #934 changed that. It turns out that users were relying on this
buggy behavior. In most cases, fixing it as simple as converting one's
rules to .ignore or .rgignore files. Unfortunately, there are other use
cases---like Perforce automatically respecting .gitignore files---that
make a strong case for ripgrep to at least support this.
The UX of a flag like this is absolutely atrocious. It's so obscure that
it's really not worth explicitly calling it out anywhere. Moreover, the
error cases that occur when this flag isn't used (but its behavior is
desirable) will not be intuitive, do not seem easily detectable and will
not guide users to this flag. Nevertheless, the motivation for this is
just barely strong enough for me to begrudgingly accept this.
Fixes #1414, Closes #1416
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/test_complete.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/test_complete.sh b/ci/test_complete.sh index 985ef11b..0268de89 100755 --- a/ci/test_complete.sh +++ b/ci/test_complete.sh @@ -44,7 +44,7 @@ main() { # Occasionally we may have to handle some manually, however help_args=( ${(f)"$( $rg --help | - $rg -i -- '^\s+--?[a-z0-9]|--[imnp]' | + $rg -i -- '^\s+--?[a-z0-9]|--[a-z]' | $rg -ior '$1' -- $'[\t /\"\'`.,](-[a-z0-9]|--[a-z0-9-]+)\\b' | $rg -v -- --print0 | # False positives sort -u |