summaryrefslogtreecommitdiffstats
path: root/ignore
AgeCommit message (Collapse)Author
2018-09-07deps: update versions for all cratesAndrew Gallant
I don't think every change here is needed, but this ensures we're using the latest version of every direct dependency.
2018-09-04windows: fix unused warnings on WindowsAndrew Gallant
2018-09-03ignore/types: add pascal typehelloer
PR #1036
2018-08-28ignore: add into_path for DirEntry (#1031)Aaron Power
This commit adds ignore::DirEntry::into_path to match the corresponding method on walkdir::DirEntry.
2018-08-27ignore: add 'stdout' skipping to the walkerAndrew Gallant
This commit adds a new 'skip_stdout' option to the directory walker. When enabled, it will skip yielding any directory entries that are believed to correspond to stdout for the current process. This is useful for filtering out 'results' in a command like 'grep -r foo > results' in order to avoid an unbounded feedback mechanism.
2018-08-26ignore: add sort_by_file_path builder methodAndrew Gallant
This permits callers to sort entries by their full file path, which makes it easy to query for various file statistics. It would have been better to provide a comparator on DirEntry itself, similar to how walkdir does it, but this seems to require quite a bit of work to make the types work out, assuming we want to continue to use walkdir's sorting support (we do).
2018-08-26ignore: add 'same_file_system' optionAndrew Gallant
This commit adds a 'same_file_system' option to the walk builder. For single threaded walking, it defers to the walkdir crate, which has the same option. The bulk of this commit implements this flag for the parallel walker. We add one very feeble test for this. The parallel walker is now officially a complete mess. Closes #321
2018-08-23deps: update walkdir minimum versionAndrew Gallant
We'll want to be using the new `same_file_system` option soon.
2018-08-21ignore: fix false positive in path_is_symlinkAndrew Gallant
This commit fixes a bug where the first path always reported itself as as symlink via `path_is_symlink`. Part of this fix includes updating walkdir to 2.2.1, which also includes a corresponding bug fix. Fixes #984
2018-08-21ripgrep: remove workaround for std bugAndrew Gallant
This commit undoes a work-around for a bug in Rust's standard library that prevented correct file type detection on Windows in OneDrive directories. We remove the work-around because we are moving to a latest-stable Rust version policy, which has included this fix for a while now. ref #705, https://github.com/rust-lang/rust/issues/46484
2018-08-21ignore: clarify docs for DirEntry::errorAndrew Gallant
Fixes #953
2018-08-21ripgrep: move minimum version to Rust stableAndrew Gallant
This also updates some code to make use of our more liberal versioning requirement, including the use of crossbeam-channel instead of the MsQueue from the older an unmaintained crossbeam 0.3. This does regrettably add a sizable number of dependencies, however, compile times seem mostly unaffected. Closes #1019
2018-08-20ignore/types: add .mako and .mao for Mako templatesAndy Freeland
I've personally never seen `.mao`, but GitHub includes it in Linguist: https://github.com/github/linguist/blob/4f11062304ae28b09a9b90c4536a92a27e142dcb/lib/linguist/languages.yml#L2702-L2709
2018-08-20ripgrep: migrate to libripgrepAndrew Gallant
This commit does the work to delete the old `grep` crate and effectively rewrite most of ripgrep core to use the new libripgrep crates. The new `grep` crate is now a facade that collects the various crates that make up libripgrep. The most complex part of ripgrep core is now arguably the translation between command line parameters and the library options, which is ultimately where we want to be.
2018-08-14ignore/types: add *.sbt to scala typewoky
Sbt is currently most used Scala build tool which uses *.sbt files, which are basically Scala. PR #1010
2018-08-07ignore/types: add Idris, Dhall and ATSVanessa McHale
And also improve Haskell detection. PR #1007
2018-07-29ignore: fix typoAndrew Gallant
2018-07-29ignore/style: 80 columns, dammitAndrew Gallant
2018-07-29ignore: fix bug in matched_path_or_any_parentsAndrew Gallant
This method was supposed to panic whenever the given path wasn't under the root of the gitignore patcher. Instead of using assert!, it was using debug_assert!. This actually caused tests to fail when running under release mode, because the debug_assert! wouldn't trip. Fixes #671
2018-07-28ignore-0.4.3ignore-0.4.3Andrew Gallant
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