1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-20 06:15:37 +02:00
Commit Graph

883 Commits

Author SHA1 Message Date
64dc9b6709 update deps 2016-11-09 18:54:22 -05:00
9ffd4c421f ignore-0.1.5 ignore-0.1.5 2016-11-09 18:52:52 -05:00
d862b80afb changelog 0.2.9 2016-11-09 18:52:08 -05:00
5b73dcc8ab Rework parallelism in directory iterator.
Previously, ignore::WalkParallel would invoke the callback for all
*explicitly* given file paths in a single thread, which effectively
meant that `rg pattern foo bar baz ...` didn't actually search foo, bar
and baz in parallel.

The code was structured that way to avoid spinning up workers if no
directory paths were given. The original intention was probably to have
a separate pool of threads responsible for searching, but ripgrep ended
up just reusing the ignore::WalkParallel workers themselves for searching,
and thereby subjected to its sub-par performance in this case.

The code has been restructured so that file paths are sent to the workers,
which brings back parallelism.

Fixes #226
2016-11-09 17:19:40 -05:00
2dce0dc0df Fix a bug with handling --ignore-file.
Namely, passing a directory to --ignore-file caused ripgrep to allocate
memory without bound.

The issue was that I got a bit overzealous with partial error
reporting. Namely, when processing a gitignore file, we should try
to use every pattern even if some patterns are invalid globs (e.g.,
a**b). In the process, I applied the same logic to I/O errors. In this
case, it manifest by attempting to read lines from a directory, which
appears to yield Results forever, where each Result is an error of the
form "you can't read from a directory silly." Since I treated it as a
partial error, ripgrep was just spinning and accruing each error in
memory, which caused the OOM killer to kick in.

Fixes #228
2016-11-09 16:45:23 -05:00
2e5c3c05e8 reword 2016-11-06 19:48:49 -05:00
6884eea2f5 reword 2016-11-06 19:48:17 -05:00
a3a2f0be6a ucg author says it's not a bug per se 2016-11-06 19:45:18 -05:00
f24873c70b Don't ever search directories. 2016-11-06 19:02:14 -05:00
58126ffe15 touchups 2016-11-06 18:51:00 -05:00
17644a76c0 typo 2016-11-06 18:49:07 -05:00
9fc9f368f5 Always search paths given by user.
This permits doing `rg -a test /dev/sda1` for example, where as before
/dev/sda1 was skipped because it wasn't a regular file.
2016-11-06 18:23:50 -05:00
9cab076a72 touchups 2016-11-06 18:04:55 -05:00
7aa9652f3c touchups 2016-11-06 18:02:45 -05:00
7187f61ca8 touchups 2016-11-06 18:01:55 -05:00
f869c58a5a touchups 2016-11-06 17:59:57 -05:00
3538ba3577 Update README with more/updated benchmarks 2016-11-06 17:55:38 -05:00
a454fa75b9 Update brew tap. 2016-11-06 16:51:14 -05:00
18943b9317 0.2.8 0.2.8 2016-11-06 16:16:48 -05:00
68427b5b79 changelog 0.2.8 2016-11-06 16:16:19 -05:00
4ca15a8a51 simd-accel should not invoke avx-accel.
This was a silly transcription error.
2016-11-06 16:15:23 -05:00
2daef51fe5 0.2.7 0.2.7 2016-11-06 15:49:25 -05:00
43ed91dc5c changelog 0.2.7 2016-11-06 15:48:52 -05:00
dada75d2a7 Update sub-crate dependency versions. 2016-11-06 15:48:40 -05:00
76b9f01ad2 ignore-0.1.4 ignore-0.1.4 2016-11-06 15:35:21 -05:00
8baa0e56b7 grep-0.1.4 grep-0.1.4 2016-11-06 15:35:17 -05:00
301ee6d3f5 globset-0.1.2 globset-0.1.2 2016-11-06 15:35:05 -05:00
77ad7588ae Add --no-messages flag.
This flag is similar to what's found in grep: it will suppress all error
messages, such as those shown when a particular file couldn't be read.

Closes #149
2016-11-06 14:36:08 -05:00
58aca2efb2 Add -m/--max-count flag.
This flag limits the number of matches printed *per file*.

Closes #159
2016-11-06 13:09:53 -05:00
351eddc17e Add new 'h' file type.
This is intended to correspond to C/C++ header files.

Fixes #186
2016-11-06 12:23:42 -05:00
277dda544c Include the name "ripgrep" in more places.
Fixes #203
2016-11-06 12:21:36 -05:00
8c869cbd87 update man page 2016-11-06 12:10:55 -05:00
598b162fea Note -e/--regexp's additional usefulness.
Specifically, it can be used when searching for patterns that start
with a dash.

Fixes #215
2016-11-06 12:10:27 -05:00
0222e024fe Fixes a bug with --smart-case.
This was a subtle bug, but the big picture was that the smart case
information wasn't being carried through to the literal extraction in
some cases. When this happened, it was possible to get back an incomplete
set of literals, which would therefore miss some valid matches.

The fix to this is to actually parse the regex and determine whether
smart case applies before doing anything else. It's a little extra work,
but parsing is pretty fast.

Fixes #199
2016-11-06 12:07:47 -05:00
5bd0edbbe1 Actually use simd/avx optimizations in bytecount crate.
Also update compile script.
2016-11-05 22:44:33 -04:00
4368913d8f Merge branch 'fast_linecount' 2016-11-05 22:29:42 -04:00
02de97b8ce Use the bytecount crate for fast line counting.
Fixes #128
2016-11-05 22:29:26 -04:00
32db773d51 Merge pull request #223 from BurntSushi/ignore-parallel
Add parallel recursive directory iterator.
2016-11-05 22:19:47 -04:00
b272be25fa Add parallel recursive directory iterator.
This adds a new walk type in the `ignore` crate, `WalkParallel`, which
provides a way for recursively iterating over a set of paths in parallel
while respecting various ignore rules.

The API is a bit strange, as a closure producing a closure isn't
something one often sees, but it does seem to work well.

This also allowed us to simplify much of the worker logic in ripgrep
proper, where MultiWorker is now gone.
2016-11-05 21:45:55 -04:00
f63c168563 Rename IgnoreOptions::has_ignores
The name has_ignores is not descriptive in my opinion. I think
has_any_ignore_options more clearly states this method's purpose. I also
considered simply IgnoreOptions::any though I went with the more verbose
option.
2016-11-06 01:17:41 +01:00
a05671c8d7 Use new Match::or to simplify return 2016-11-06 01:07:11 +01:00
1aeae3e22d update ripgrep 2016-11-04 21:12:08 -04:00
60d537c43d Merge pull request #220 from theamazingfedex/adding-mak-type
adding .mak extension for makefile filetype.
2016-11-03 20:46:29 -04:00
ef5c07476b Merge pull request #219 from theamazingfedex/adding-pdf-filetype
adding .pdf filetype to available types.
2016-11-03 20:46:07 -04:00
4f6f34307c Merge pull request #218 from theamazingfedex/adding-cs-filetype
adding cs filetype for ease of use.
2016-11-03 20:46:02 -04:00
7cf560d27c adding .mak extension for makefile filetype.
Fixes #217
2016-11-03 15:52:10 -06:00
15b263ff55 adding cs filetype for ease of use. 2016-11-03 15:33:00 -06:00
53121e0733 adding .pdf filetype to available types. 2016-11-03 15:30:58 -06:00
404785f950 Merge pull request #214 from lyuha/master
Add textile, org, creole, rdoc, wiki filetype
2016-11-02 11:53:22 -04:00
103c4c953c Add pod filetype 2016-11-03 00:06:14 +09:00