summaryrefslogtreecommitdiffstats
path: root/ignore
AgeCommit message (Collapse)Author
2018-07-28ignore: respect XDG_CONFIG_DIR/git/configAndrew Gallant
This commit updates the logic for finding the value of git's `core.excludesFile` configuration parameter. Namely, we now check `$XDG_CONFIG_DIR/git/config` in addition to `$HOME/.gitconfig` (where the latter overrules the former on a knob-by-knob basis). Fixes #995
2018-07-22ignore: only respect .gitignore in git reposAndrew Gallant
This commit fixes an interesting bug in the `ignore` crate where it would basically respect any `.gitignore` file anywhere (including global gitignores in `~/.config/git/ignore`), regardless of whether we were searching in a git repository or not. This commit rectifies that behavior to only respect gitignore rules when in a git repo. The key change here is to move the logic of whether to traverse parents into the directory matcher rather than putting the onus on the directory traverser. In particular, we now need to traverse parent directories in more cases than we previously did, since we need to determine whether we're in a git repository or not. Fixes #934
2018-07-21ripgrep: add support for lz4 decompressionKalle Samuels
This uses the lz4 binary for decompression. Closes #898
2018-07-21ignore: fix has_any_ignore_rules for explicit ignoresphiresky
When building a ignore::WalkBuilder by disabling all standard filters and adding a custom global ignore file, the ignore file is not used. Example: let mut walker = ignore::WalkBuilder::new(dir); walker.standard_filters(false); walker.add_ignore(myfile); This makes it impossible to use the ignore crate to walk a directory with only custom ignore files. Very similar to issue #800 (fixed in b71a110). PR #988
2018-07-16ignore: permit use of env::home_dirAndrew Gallant
Upstream deprecated env::home_dir because of minor bugs in some corner cases. We should probably eventually migrate to a correct implementation in the `dirs` crate, but using the buggy version is just fine for now.
2018-06-23ignore/types: add BazelStepan Koltsov
`BUILD`, `WORKSPACE` are mentioned here: https://docs.bazel.build/versions/master/build-ref.html `*.bzl` is mentioned here: https://docs.bazel.build/versions/master/skylark/concepts.html PR #960
2018-06-15ignore/types: add Android makefile typesMårten Kongstad
The Android platform is gradually moving from Makefiles (*.mk) to Blueprint files (*.bp). Add support for both. See [1] for more information. 1. https://android.googlesource.com/platform/build/blueprint/+/master-soong
2018-06-15ignore/types: add AIDL file typeMårten Kongstad
Add support for Android Interface Definition Language files (*.aidl). See [1] for more information. 1. https://developer.android.com/guide/components/aidl
2018-06-06ignore/types: add FIDL typeTim Kilbourn
FIDL is the Fuchsia Interface Definition Language https://fuchsia.googlesource.com/zircon/+/HEAD/docs/fidl/index.md
2018-05-08ignore/types: add jsp extension to java typeStephen E. Baker
2018-05-07deps: update regex to 1.0Bastien Orivel
We retain the `simd-accel` feature on globset for backwards compatibility, but will remove it in the next semver release.
2018-05-06ignore/doc: improve docs for case_insensitiveGarrett Squire
This commit updates the OverrideBuilder and GitignoreBuilder docs for the case_insensitive method, denoting that it must be called before adding any patterns.
2018-05-06doc: update suggested version for ignoreElliott Slaughter
2018-05-03ignore/types: add shorthand 'hs' for HaskellBram Geron
2018-04-29ignore/types: fix typo in puppet globAndrew Gallant
Thanks @CYBAI for noticing this! See #899
2018-04-29ignore/types: add puppetZach Crownover
Puppet is primarily written in it's own format of .pp files, but custom facts and functions are often written in Ruby. The templating language is ERB and so this will allow scanning of any of the three most commonly used formats for Puppet specific things.
2018-04-24ignore: speed up Gitignore::emptyAndrew Gallant
This commit makes Gitignore::empty a bit faster by avoiding allocation and manually specializing the implementation instead of routing it through the GitignoreBuilder. This helps improve uses of ripgrep that traverse *many* directories, and in particular, when the use of ignores is disabled via command line switches. Fixes #835, Closes #836
2018-04-24ignore/types: add verilogJonathan Klimt
2018-04-23ignore: support .git directory OR fileAndrew Gallant
This improves support for submodules, which seem to use a '.git' file instead of a '.git' directory to indicate a worktree. Fixes #893
2018-04-21ignore: release 0.4.2ignore-0.4.2Andrew Gallant
2018-04-21globset: release 0.4.0globset-0.4.0Andrew Gallant
2018-04-21ignore: impl Clone for DirEntryAndrew Gallant
There is a small hiccup here in that a `DirEntry` can embed errors associated with reading an ignore file, which can be accessed and logged by consumers if desired. That error type can contain an io::Error, which isn't cloneable. We therefore implement Clone on our library's error type in a way that re-creates the I/O error as best as possible. Fixes #891
2018-04-05ignore: add Clone/Debug for buildersFlorentBecker
2018-03-12deps: update regex crateAndrew Gallant
This update brings with it a new feature of the regex crate which will now use SIMD optimizations automatically at runtime with no necessary compile time flags. All that's needed is to enable the `unstable` feature. Other crates, such as bytecount and encoding_rs, are still using the old-style SIMD support, so we leave the simd-accel and avx-accel features. However, the binaries we distribute on Github no longer have those features enabled, which makes them truly portable. Fixes #135
2018-03-10ignore: support backslash escapingBrian Malehorn
Use the new `Globset::backslash_escape` knob to conform to git behavior: `\` will escape the following character. For example, the pattern `\*` will match a file literally named `*`. Also tweak a test in ripgrep that was relying on this incorrect behavior. Closes #526, Closes #811
2018-02-20ignore: release 0.4.1ignore-0.4.1Andrew Gallant
2018-02-20ignore: fix performance regression on WindowsAndrew Gallant
This commit fixes a performance regression in Windows that resulted from fallout from fixing #705. In particular, we introduced an additional stat call for every single directory entry, which can be quite disastrous for performance. There is a corresponding companion PR that fixes the same bug in walkdir: https://github.com/BurntSushi/walkdir/pull/96 Fixes #820
2018-02-19types: add csvAndrey Kolomoets
2018-02-19ignore: fix symlink following on WindowsAndrew Gallant
This commit fixes a bug where symlinks were always being followed on Windows, even if the user did not request it. This only impacts the parallel iterator. This is a regression from the fallout of fixing #705. Fixes #824
2018-02-14ignore: fix improper hidden filteringAndrew Gallant
This commit fixes a bug where `rg --hidden .` would behave differently with respect to ignore filtering than `rg --hidden ./`. In particular, this was due to a bug where the directory name `.` caused the leading `.` in a hidden directory to get stripped, which in turn caused the ignore rules to fail. Fixes #807
2018-02-14ignore: fix custom ignore name bugDavid Peter
This commit fixes a bug in the handling of custom gitignore file names. Previously, the directory walker would check for whether there were any ignore rules present, but this check didn't incorporate the custom gitignore rules. At a high level, this permits custom gitignore names to be used even if no other source of gitignore rules is used. Fixes #800
2018-02-13types: add VHDLunsignedint
2018-02-11ignore: release 0.4.0ignore-0.4.0Andrew Gallant
2018-02-11globset: release 0.3.0globset-0.3.0Andrew Gallant
2018-02-04logger: drop env_loggerAndrew Gallant
This commit updates the `log` crate to 0.4 and drops the dependency on env_logger. In particular, the latest version of env_logger brings in additional non-optional dependencies such as chrono that I don't think is worth including into ripgrep. It turns out ripgrep doesn't need any fancy logging. We just need a concept of log levels and the ability to print to stderr. Therefore, we just roll our own super simple logger. This update is motivated by the persistent configuration task. In particular, we need the ability to toggle the global log level more than once, and this doesn't appear to be possible with older versions of the log crate.
2018-02-01windows: fix OneDrive traversalsAndrew Gallant
This commit fixes a bug on Windows where directory traversals were completely broken when attempting to scan OneDrive directories that use the "file on demand" strategy. The specific problem was that Rust's standard library treats OneDrive directories as reparse points instead of directories, which causes methods like `FileType::is_file` and `FileType::is_dir` to always return false, even when retrieved via methods like `metadata` that purport to follow symbolic links. We fix this by peppering our code with checks on the underlying file attributes exposed by Windows. We consider an entry a directory if and only if the directory bit is set on the attributes. We are careful to make sure that the code remains the same on non-Windows platforms. Note that we also bump the dependency on `walkdir`, which contains a similar fix for its traversals. This bug is recorded upstream: https://github.com/rust-lang/rust/issues/46484 Upstream also has a pending PR: https://github.com/rust-lang/rust/pull/47956 Fixes #705
2018-01-30search: add support for searching compressed filesBalaji Sivaraman
This commit adds opt-in support for searching compressed files during recursive search. This behavior is only enabled when the `-z/--search-zip` flag is passed to ripgrep. When enabled, a limited set of common compression formats are recognized via file extension, and a new process is spawned to perform the decompression. ripgrep then searches the stdout of that spawned process. Closes #539
2018-01-29ignore: support custom file namesptzz
This commit adds support for ignore files with custom names. This allows for application specific ignorefile names, e.g. using `.fdignore` for `fd`. See also: https://github.com/BurntSushi/ripgrep/issues/673 See also: https://github.com/sharkdp/fd/issues/156
2018-01-29types: add Smarty tplMichael Salihi
It is used by Prestashop CMS and more.
2018-01-29ignore: fix handling of / in patternsdana
This commit makes handling of patterns containing a `/` match actual git behaviour and the specification written in `man gitignore`. Fixes #761
2018-01-17types: add gn typeArvid Gerstmann
This is for Google's new build system.
2018-01-17types: add hxx to the cpp typeArvid Gerstmann
2018-01-14types: add webidl (*.webidl)Hendrik Sollich
2018-01-12types: add webidlHendrik Sollich
2018-01-12types: yarn.lock is not YAMLdana
Fixes #747
2018-01-11types: add Apache avroMridul Singhai
2018-01-09Update types.rsEitan Adler
2018-01-09Add a type for man pagesEitan Adler
2018-01-01cleanup: replace try! with ?Balaji Sivaraman
2017-12-30deps: bump lazy_static to 1Igor Gnatenko