commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
92c81b122548ab42586314ea535bb46ea41f1b10 | Andrew Gallant | 2023-10-12T16:16:42 | core: switch to anyhow
This commit adds `anyhow` as a dependency and switches over to it from
Box<dyn Error>.
It actually looks like I've kept all of my errors rather shallow, such
that we don't get a huge benefit from anyhow at present. But now that
anyhow is in use, I expect to use its "context" feature more going
... | diff --git a/Cargo.lock b/Cargo.lock
index 13fc7c9..472b561 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,6 +11,12 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "anyhow"
+version = "1.0.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c... | 6 | 105 | 104 |
53679e4c43e472b2f51d9568455caa10ad399fc4 | Tavian Barnes | 2023-10-11T20:17:29 | ignore: simplify the work-stealing strategy
There's no particular reason for this change. I happened to be looking
at the code again and realized that stealing from your left neighbour
or your right neighbour shouldn't make a difference (and indeed perf is
the same in my benchmarks).
Closes #2624 | diff --git a/crates/ignore/src/walk.rs b/crates/ignore/src/walk.rs
index 2d754da..4fee1d8 100644
--- a/crates/ignore/src/walk.rs
+++ b/crates/ignore/src/walk.rs
@@ -1439,15 +1439,15 @@ impl Stack {
/// Steal a message from another queue.
fn steal(&self) -> Option<Message> {
- // For fairness, try to ... | 1 | 5 | 5 |
8b766a2522f419ac33552b2f82ec2ad79646c601 | Andrew Gallant | 2023-10-11T23:54:24 | ripgrep: disable hyperlinks by default
As a result of discussion in #2611, it seems prudent to disable
hyperlinks by default. Ideally they would be enabled, but it looks like
some environments may barf on them. Since this is the first release with
hyperlink support, it makes sense to me at least to make users opt into... | diff --git a/crates/core/app.rs b/crates/core/app.rs
index f78ed8d..3e0247f 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -1565,10 +1565,12 @@ empty string.
A format string may be empty. An empty format string is equivalent to the
'none' alias. In this case, hyperlinks will be disabled.
-At present, t... | 2 | 7 | 5 |
c21302b4096f9ce1af095fbe8b14828a90ecfecb | Andrew Gallant | 2023-10-11T20:37:09 | regex: tweak inner literal heuristic
Previously, we had logic to skip our own inner literal optimization if
the regex itself was already (likely) accelerated. It turns out that the
presence of a Unicode word boundary can defeat acceleration to a point.
It's likely enough that even if the underlying regex is accelerate... | diff --git a/crates/regex/src/literal.rs b/crates/regex/src/literal.rs
index 831b82c..e2f158b 100644
--- a/crates/regex/src/literal.rs
+++ b/crates/regex/src/literal.rs
@@ -65,12 +65,19 @@ impl InnerLiterals {
// If we believe the regex is already accelerated, then just let
// the regex engine do its ... | 1 | 12 | 5 |
8a5b81716af38234c98f684096b4c5e36ce80763 | Andrew Gallant | 2023-10-11T20:23:43 | deps: update dependencies
Specifically, regex-syntax 0.8.1 has this fix:
https://github.com/rust-lang/regex/commit/f082244720d02fea04185c654e3d0dc95e39309d | diff --git a/Cargo.lock b/Cargo.lock
index 324bdaa..13fc7c9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -278,9 +278,9 @@ dependencies = [
[[package]]
name = "jobserver"
-version = "0.1.26"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "936cfd212a0155903bcbc060e316... | 1 | 4 | 4 |
7099e174acbcbd940f57e4ab4913fee4040c826e | Andrew Gallant | 2023-10-10T00:14:34 | cargo: remove dependency patches
I'm too lazy to fixup old commits. | diff --git a/Cargo.lock b/Cargo.lock
index 772bec7..324bdaa 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -396,6 +396,8 @@ dependencies = [
[[package]]
name = "regex"
version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb839... | 2 | 6 | 5 |
a13b5e0196324d123ca065db9bf0aa626d993feb | Andrew Gallant | 2023-10-09T22:23:43 | deps: update various crates | diff --git a/Cargo.lock b/Cargo.lock
index 73e6ad5..772bec7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -287,15 +287,15 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.148"
+version = "0.2.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cdc71e17332e86d2e1d38c1f99ed... | 1 | 10 | 10 |
9626f167573527858f9736a3054882de87d6cd79 | Andrew Gallant | 2023-10-09T22:23:36 | progress | diff --git a/Cargo.lock b/Cargo.lock
index 4605c11..73e6ad5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.1.1"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea5d730647d4fadd988536d06fecce94b7b4... | 14 | 107 | 802 |
f7ff34fdf9d2853f9763aceb28f5dcb014728045 | Andrew Gallant | 2023-10-08T18:49:18 | searcher: simplify 'replace_bytes' routine
I did this in the course of trying to optimize it. I don't believe I
made it any faster, but the refactoring led to code that I think is
more readable. | diff --git a/crates/searcher/src/line_buffer.rs b/crates/searcher/src/line_buffer.rs
index a09d4e1..badcc43 100644
--- a/crates/searcher/src/line_buffer.rs
+++ b/crates/searcher/src/line_buffer.rs
@@ -524,24 +524,26 @@ impl LineBuffer {
/// Replaces `src` with `replacement` in bytes, and return the offset of the
//... | 1 | 14 | 12 |
b9de003f8125b7257e70dd72183ad6250facd3da | Andrew Gallant | 2023-10-08T18:48:29 | matcher: add a bunch of inline annotations
Many of these functions should be inlineable, but I'm not 100% sure
that they can be inlined without these annotations. We don't want to
force things, but we do try and nudge the compiler in the right
direction. | diff --git a/crates/matcher/src/interpolate.rs b/crates/matcher/src/interpolate.rs
index 1a9471d..934e814 100644
--- a/crates/matcher/src/interpolate.rs
+++ b/crates/matcher/src/interpolate.rs
@@ -10,6 +10,7 @@ use memchr::memchr;
/// of a capture group reference and is expected to resolve the index to its
/// corres... | 2 | 66 | 0 |
1659fb9b43efaf717152d7e5296a578984bbde50 | Andrew Gallant | 2023-09-30T18:16:51 | printer: hand-roll decimal formatting
It seems like a trifle, but if the match frequency is high enough, the
allocation+formatting of line numbers (and columns and byte offsets)
starts to matter. We squash that part of the profile in this commit by
doing our own decimal formatting. I speculate that we get a speed-up
f... | diff --git a/crates/printer/src/hyperlink.rs b/crates/printer/src/hyperlink.rs
index 34ba591..279258c 100644
--- a/crates/printer/src/hyperlink.rs
+++ b/crates/printer/src/hyperlink.rs
@@ -5,7 +5,7 @@ use {
termcolor::{HyperlinkSpec, WriteColor},
};
-use crate::hyperlink_aliases;
+use crate::{hyperlink_aliases,... | 3 | 67 | 7 |
dd1bc5b89873295d4e81f7a93624963e99586c17 | Andrew Gallant | 2023-09-30T18:15:48 | printer: sprinkle in a few #[inline] annotations
These seem to help when ripgrep emits a lot of output, especially when
the --column flag is used. | diff --git a/crates/printer/src/counter.rs b/crates/printer/src/counter.rs
index a9f5af1..3f74d93 100644
--- a/crates/printer/src/counter.rs
+++ b/crates/printer/src/counter.rs
@@ -20,78 +20,77 @@ impl<W: Write> CounterWriter<W> {
impl<W> CounterWriter<W> {
/// Returns the total number of bytes written since cons... | 2 | 15 | 15 |
c9bfbe1e3d350bb93356167df9c4085abdbc2316 | Andrew Gallant | 2023-09-30T18:15:00 | deps: bump regex and regex-automata
This brings in a fix for a bug I found during ad hoc benchmarking:
https://github.com/rust-lang/regex/commit/aa4e4c7120b0090ce0624e3c42a2ed06dd8b918a | diff --git a/Cargo.lock b/Cargo.lock
index 2776e6c..4605c11 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -395,9 +395,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.9.5"
+version = "1.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "697061221ea1b4a94a624f67d0ae2bfe4e... | 1 | 4 | 4 |
88524a2b5232c951f9d4c0a169a046a7354251bd | Andrew Gallant | 2023-09-30T12:17:54 | core: dedup patterns
ripgrep does not, and likely never will, report which pattern matched.
Because of that, we can dedup the patterns via just their concrete
syntax without any fuss.
This is somewhat of a pathological case because you don't expect the end
user to pass duplicate patterns in general. But if the end us... | diff --git a/crates/core/args.rs b/crates/core/args.rs
index 0da9f00..05d015a 100644
--- a/crates/core/args.rs
+++ b/crates/core/args.rs
@@ -1,4 +1,5 @@
use std::{
+ collections::HashSet,
env,
ffi::{OsStr, OsString},
io::{self, IsTerminal, Write},
@@ -1436,35 +1437,44 @@ impl ArgMatches {
if... | 1 | 22 | 12 |
9c6732bd2670d5f04fa5f19744aae12c3fb38572 | Andrew Gallant | 2023-09-28T20:25:35 | printer: remove 'subl' alias
It was apparently using a format specific to a particular plugin. I did
know that, but apparently the plugin is not ubiquitous or de facto
standard[1]. Thus, including it I think just leads to more confusion. We
definitely do not want to be in the business of bundling aliases for
every con... | diff --git a/crates/core/app.rs b/crates/core/app.rs
index ae97a2b..f78ed8d 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -1529,10 +1529,10 @@ in terminal emulators that support OSC-8 hyperlinks. For example, the format
file://{host}{path} will emit an RFC 8089 hyperlink. To see the format that
ripgrep ... | 2 | 4 | 6 |
90b849912f74a41faa9f0b4f0aa3a829a44fd4b5 | Andrew Gallant | 2023-09-28T20:03:21 | deps: bump what we can | diff --git a/Cargo.lock b/Cargo.lock
index 1ca1149..2776e6c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -534,9 +534,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-width"
-version = "0.1.10"
+version = "0.1.11"
source = "registry+https://github.com/rus... | 1 | 2 | 2 |
6d17b3ed6810a46fd89925c4f96cd88883224083 | Andrew Gallant | 2023-09-28T20:01:59 | deps: drop thread_local, lazy_static and once_cell
This is largely made possible by the addition of std::sync::OnceLock to
the standard library, and the memory pool available in regex-automata. | diff --git a/Cargo.lock b/Cargo.lock
index 1844e4e..1ca1149 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -143,7 +143,6 @@ dependencies = [
"aho-corasick",
"bstr",
"glob",
- "lazy_static",
"log",
"regex-automata",
"regex-syntax",
@@ -243,12 +242,10 @@ dependencies = [
"crossbeam-channel",
"crossbeam-deque... | 7 | 43 | 75 |
f16ea0812db1e7218d98ce0a131b6b7aec510c3a | Andrew Gallant | 2023-09-28T18:17:30 | ignore: polish
Like previous commits, we do a bit of polishing and bring the style up
to my current practice. | diff --git a/Cargo.lock b/Cargo.lock
index 8e45d31..1844e4e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -239,6 +239,7 @@ dependencies = [
name = "ignore"
version = "0.4.20"
dependencies = [
+ "bstr",
"crossbeam-channel",
"crossbeam-deque",
"globset",
diff --git a/crates/globset/Cargo.toml b/crates/globset/Carg... | 12 | 220 | 225 |
be9e308999b94aba4be0406dafbd8aa6201e326a | Andrew Gallant | 2023-09-28T17:19:57 | globset: use a Pool from regex-automata
In the time before, we just used a RegexSet from the regex crate. That
allocated unconditionally, so there was nothing we could do and it
didn't expose any APIs to reuse that memory. But now that we're using
the lower level regex-automata, we can reuse a PatternSet.
Ideally we ... | diff --git a/crates/globset/src/lib.rs b/crates/globset/src/lib.rs
index 15eeefb..fb1f27c 100644
--- a/crates/globset/src/lib.rs
+++ b/crates/globset/src/lib.rs
@@ -98,12 +98,21 @@ or to enable case insensitive matching.
#![deny(missing_docs)]
-use std::{borrow::Cow, path::Path};
+use std::{
+ borrow::Cow,
+ ... | 1 | 54 | 7 |
d53b7310ee1424a292228f7e8986fa9306f22a7f | Andrew Gallant | 2023-09-28T16:58:11 | searcher: polish
This updates some dependencies and brings code style in line with my
current practice. | diff --git a/Cargo.lock b/Cargo.lock
index 7be0552..8e45d31 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -319,9 +319,9 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
[[package]]
name = "memmap2"
-version = "0.5.10"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/... | 11 | 269 | 247 |
e30bbb8cff1fc59c9e7671c0aca1e8c664bde7df | Andrew Gallant | 2023-09-26T21:15:14 | grep: update to the 2021 edition | diff --git a/crates/grep/Cargo.toml b/crates/grep/Cargo.toml
index fceddba..5e9fd99 100644
--- a/crates/grep/Cargo.toml
+++ b/crates/grep/Cargo.toml
@@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/grep"
readme = "README.md"
keywords = ["regex", "grep", "egrep", "search", "patt... | 1 | 1 | 1 |
7f456404010005142a6493fb48bd9fd06aca2731 | Andrew Gallant | 2023-09-26T19:01:20 | globset: polishing
This brings the code in line with my current style. It also inlines the
dozen or so lines of code for FNV hashing instead of bringing in a
micro-crate for it. Finally, it drops the dependency on regex in favor
of using regex-syntax and regex-automata directly. | diff --git a/Cargo.lock b/Cargo.lock
index 9d8c910..7be0552 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -130,12 +130,6 @@ dependencies = [
"encoding_rs",
]
-[[package]]
-name = "fnv"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9eec918d3f24069decb9af1554cad7c8... | 6 | 179 | 152 |
0951820f63a1e38d755b2905e389e09c9b569040 | Andrew Gallant | 2023-09-26T16:03:11 | core: doc and logging touchups | diff --git a/crates/core/app.rs b/crates/core/app.rs
index 80dc2e4..78c5596 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -1526,60 +1526,71 @@ fn flag_hyperlink_format(args: &mut Vec<RGArg>) {
Set the format of hyperlinks to match results. Hyperlinks make certain elements
of ripgrep's output, such as fi... | 2 | 42 | 30 |
c3e85f2b44a05da44cea164adf14c3c39d769132 | Lucas Trzesniewski | 2023-09-25T22:38:25 | printer: fix a few issues in the hyperlink docs
Closes #2612 | diff --git a/crates/core/app.rs b/crates/core/app.rs
index d0dfc8d..80dc2e4 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -1526,7 +1526,7 @@ fn flag_hyperlink_format(args: &mut Vec<RGArg>) {
Set the format of hyperlinks to match results. Hyperlinks make certain elements
of ripgrep's output, such as file... | 2 | 8 | 8 |
3ad7a0d95e04d16e49f94b83a22f8942a234068f | Andrew Gallant | 2023-09-25T22:24:08 | crates: remove hard-coded links
And use rustdoc's native intra-crate links. So much nicer. | diff --git a/crates/cli/src/escape.rs b/crates/cli/src/escape.rs
index 9b44234..d14b81d 100644
--- a/crates/cli/src/escape.rs
+++ b/crates/cli/src/escape.rs
@@ -8,7 +8,7 @@ use bstr::{ByteSlice, ByteVec};
/// converts the non-printable subset of ASCII in addition to invalid UTF-8
/// bytes to hexadecimal escape seque... | 14 | 150 | 209 |
82d3183a04e2fac6e270c99a05229b8e1232584d | Andrew Gallant | 2023-09-25T21:21:28 | regex: some minor polish
I think I already did a clean-up of this crate when I moved it to regex
1.9, so the polish here is very minor. | diff --git a/Cargo.lock b/Cargo.lock
index 6029cc1..9d8c910 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.1.0"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0... | 6 | 16 | 127 |
798f8981eb4fbbf8d06cbb2ad4722a1acf0ee841 | Andrew Gallant | 2023-09-25T20:53:03 | pcre2: small polishing | diff --git a/crates/pcre2/Cargo.toml b/crates/pcre2/Cargo.toml
index 2725ba7..64450df 100644
--- a/crates/pcre2/Cargo.toml
+++ b/crates/pcre2/Cargo.toml
@@ -15,5 +15,5 @@ edition = "2018"
[dependencies]
grep-matcher = { version = "0.1.6", path = "../matcher" }
-log = "0.4.19"
+log = "0.4.20"
pcre2 = "0.2.4"
diff -... | 4 | 17 | 22 |
96f01b92a082cc3497e8c8bc3a63257afd07ea3a | Andrew Gallant | 2023-09-25T20:48:25 | matcher: polish the grep-matcher crate
Not much here. Just updating to reflect my current style and bringing
the crate to the 2021 edition. | diff --git a/crates/matcher/Cargo.toml b/crates/matcher/Cargo.toml
index 43ab76f..297e8d7 100644
--- a/crates/matcher/Cargo.toml
+++ b/crates/matcher/Cargo.toml
@@ -12,13 +12,13 @@ readme = "README.md"
keywords = ["regex", "pattern", "trait"]
license = "Unlicense OR MIT"
autotests = false
-edition = "2018"
+edition ... | 5 | 41 | 49 |
abfa65c2c1cd2140934ef93c438540557afc4a2c | Linda_pp | 2023-10-05T17:23:29 | ignore/types: add *.sarif for SARIF format files
[SARIF] is a format for reporting static analysis results. It is [used
by GitHub CodeQL][GH] for example.
Here are some samples from Microsoft's VSCode extension:
https://github.com/microsoft/sarif-vscode-extension/tree/main/samples
The SARIF format is built o... | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 451bacf..99749dd 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -112,7 +112,7 @@ pub const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
(&["jinja"], &["*.j2", "*.jinja", "*.jinja2"])... | 1 | 1 | 1 |
23e21133ba6a8ca2c4d040092ad1bc22f14e8861 | Andrew Gallant | 2023-09-21T21:28:58 | printer: move PathPrinter into grep-printer
I originally did not put PathPrinter into grep-printer because I
considered it somewhat extraneous to what a "grep" program does, and
also that its implementation was rather simple. But now with hyperlink
support, its implementation has grown a smidge more complicated. And
m... | diff --git a/crates/core/args.rs b/crates/core/args.rs
index 9984a59..0f8d1f1 100644
--- a/crates/core/args.rs
+++ b/crates/core/args.rs
@@ -18,8 +18,9 @@ use grep::pcre2::{
RegexMatcherBuilder as PCRE2RegexMatcherBuilder,
};
use grep::printer::{
- default_color_specs, ColorSpecs, HyperlinkPattern, JSONBuilde... | 9 | 222 | 159 |
09905560ffc32206988c92c6a37c1c927c86e3cb | Andrew Gallant | 2023-09-21T20:57:02 | printer: clean-up
Like a previous commit did for the grep-cli crate, this does some
polishing to the grep-printer crate. We aren't able to achieve as much
as we did with grep-cli, but we at least eliminate all rust-analyzer
lints and group imports in the way I've been doing recently.
Next we'll start doing some more ... | diff --git a/Cargo.lock b/Cargo.lock
index f201902..885e73d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -19,9 +19,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "base64"
-version = "0.20.0"
+version = "0.21.4"
source = "registry+https://github.com/rust-lang/cr... | 13 | 295 | 262 |
19a08bee8a99e8c725b9781568013a9f686605a3 | Andrew Gallant | 2023-09-20T18:42:03 | cli: clean-up crate
This does a variety of polishing.
1. Deprecate the tty methods in favor of std's IsTerminal trait.
2. Trim down un-needed dependencies.
3. Use bstr to implement escaping.
4. Various aesthetic polishing.
I'm doing this as prep work before adding more to this crate. And as
part of a general effort ... | diff --git a/Cargo.lock b/Cargo.lock
index 0527cc8..2f30fbf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -187,10 +187,7 @@ version = "0.1.9"
dependencies = [
"bstr",
"globset",
- "lazy_static",
"log",
- "regex",
- "same-file",
"termcolor",
"winapi-util",
]
@@ -612,9 +609,9 @@ checksum = "ac3b87c63620426dd9b9... | 11 | 165 | 306 |
86ef6833085428c21ef1fb7f2de8e5e7f54f1f72 | Andrew Gallant | 2023-09-19T01:42:32 | deps: update everything
Notably, this includes termcolor 1.3, which comes with hyperlink
support. | diff --git a/Cargo.lock b/Cargo.lock
index d11bbc2..d6fd450 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -303,9 +303,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.147"
+version = "0.2.148"
source = "registry+https://github.com/rust-lang/... | 1 | 14 | 14 |
a4387ed491b5f85b6817310c3fa0f3d20960fdcc | Andrew Gallant | 2023-09-18T13:35:06 | deps: bump to aho-corasick 1.1.0
This brings in aarch64 SIMD support for Teddy[1]. In effect, it means
searches that are multiple (but a small number of) literals extracted
will likely get much faster on aarch64 (i.e., Apple silicon). For
example, from the PR, on my M2 mac mini:
$ time rg-before-teddy-aarch64 -i ... | diff --git a/Cargo.lock b/Cargo.lock
index d2b6401..259a7c2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.0.5"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c378d78423fdad8089616f827526ee33c19... | 1 | 2 | 2 |
d2a409f89f1eb8e3ad3990aeb1fff944289534f2 | Andrew Gallant | 2023-09-02T18:40:45 | deps: bump to memchr 2.6.3
This brings in a fix for line counting when SIMD isn't available[1].
[1]: https://github.com/BurntSushi/memchr/pull/137 | diff --git a/Cargo.lock b/Cargo.lock
index fa1ea97..d2b6401 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -296,9 +296,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "memchr"
-version = "2.6.2"
+version = "2.6.3"
source = "registry+https://github.com/rust-lang/cr... | 1 | 2 | 2 |
6cdb99ea61d585cc32716d181517d71b4df769b5 | Andrew Gallant | 2023-09-02T16:25:34 | deps: drop bytecount in favor of memchr_iter(..).count()
As of the memchr 2.6 release, its Iterator::count method is specialized
to only count the number of occurrences instead of finding the offset of
each occurrence. This replaces ripgrep's use of the bytecount crate.
While micro-benchmarks suggest that memchr's met... | diff --git a/Cargo.lock b/Cargo.lock
index 50b377c..fa1ea97 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -40,12 +40,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bytecount"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c... | 3 | 4 | 12 |
551ad3bada9f759beacf9c418ff82f78414e641a | Andrew Gallant | 2023-09-02T16:15:15 | deps: update bstr | diff --git a/Cargo.lock b/Cargo.lock
index 35efc5b..50b377c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -31,9 +31,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bstr"
-version = "1.6.0"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates... | 1 | 2 | 2 |
8856f72df5525958927ada364a056e0a425d15e7 | Andrew Gallant | 2023-09-02T16:14:50 | deps: update the regex family of crates | diff --git a/Cargo.lock b/Cargo.lock
index 6ddf1a9..35efc5b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.0.4"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6748e8def348ed4d14996fa801f4122cd763... | 1 | 8 | 8 |
d596f6ebd035560ee5706f7c0299c4692f112e54 | Yochem van Rosmalen | 2023-08-31T12:51:07 | ignore/types: add *.vsh to V type
PR #2604 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 2a97ae7..451bacf 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -289,7 +289,7 @@ pub const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
(&["txt"], &["*.txt"]),
(&["typoscript"],... | 1 | 1 | 1 |
6cd947963420360d8e4fe7f9eff93f4636d037a1 | Christian Vallentin | 2023-08-29T02:55:19 | ignore: implement FusedIterator for Walk
PR #2567 | diff --git a/crates/ignore/src/walk.rs b/crates/ignore/src/walk.rs
index 1f7d06e..734b876 100644
--- a/crates/ignore/src/walk.rs
+++ b/crates/ignore/src/walk.rs
@@ -3,6 +3,7 @@ use std::ffi::OsStr;
use std::fmt;
use std::fs::{self, FileType, Metadata};
use std::io;
+use std::iter::FusedIterator;
use std::path::{Pat... | 1 | 3 | 0 |
51765f2f4cbd6c561df35cf1d7d8637cf73006fa | Andrew Gallant | 2023-08-29T00:09:26 | ignore: apply rustfmt
I believe this happened because rustfmt now knows how to format `let ...
else` constructs. | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 7cec457..2a97ae7 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -331,7 +331,9 @@ mod tests {
#[test]
fn default_types_are_sorted() {
let mut names = DEFAULT_TYPES.it... | 1 | 3 | 1 |
67abd49678948b2d33e3a9a40f0b37a9c7dfb6c5 | Andrew Gallant | 2023-08-29T00:00:41 | deps: bump everything else | diff --git a/Cargo.lock b/Cargo.lock
index 1069bfc..6ddf1a9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,6 +11,12 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36... | 1 | 37 | 21 |
a7fe2967725b1b122318c7cc61cc2bd6a37e3fa2 | Andrew Gallant | 2023-08-28T23:59:09 | deps: bump regex, regex-automata and regex-syntax | diff --git a/Cargo.lock b/Cargo.lock
index c50d7d0..1069bfc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -374,9 +374,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.9.3"
+version = "1.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81bc1d4caf89fac26a70747fe603c13009... | 1 | 6 | 6 |
f75991538b3445b79be795009b23c865351b1771 | Andrew Gallant | 2023-08-28T23:56:59 | deps: bump memchr to 2.6.0
This in particular brings in a PR[1] that provides huge speedups on
aarch64 (e.g., Apple silicon).
[1]: https://github.com/BurntSushi/memchr/pull/129 | diff --git a/Cargo.lock b/Cargo.lock
index 0260158..c50d7d0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -296,9 +296,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "memchr"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/cr... | 1 | 2 | 2 |
c51790b56d6d06cfed888c759e381a86f7dc5095 | Andrew Gallant | 2023-08-15T15:09:46 | deps: update everything | diff --git a/Cargo.lock b/Cargo.lock
index 9fede95..0260158 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -42,11 +42,12 @@ checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c"
[[package]]
name = "cc"
-version = "1.0.79"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crat... | 1 | 33 | 32 |
2af3734e0c0d729479d697cc0ba40fa00ef92358 | Andrew Gallant | 2023-08-15T15:08:41 | deps: update aho-corasick
This brings in [1,2], which improves memory usage substantially when
Aho-Corasick is used.
[1]: https://github.com/BurntSushi/aho-corasick/pull/120
[2]: https://github.com/BurntSushi/aho-corasick/pull/121 | diff --git a/Cargo.lock b/Cargo.lock
index 1fd0203..9fede95 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.0.2"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43f6cb1bf222025340178f382c426f13757b... | 1 | 2 | 2 |
61733f6378b62fa2dc2e7f3eff2f2e7182069ca9 | Andrew Gallant | 2023-08-05T13:34:36 | globset-0.4.13 | diff --git a/Cargo.lock b/Cargo.lock
index 3fe43a8..1fd0203 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -119,7 +119,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "globset"
-version = "0.4.12"
+version = "0.4.13"
dependencies = [
"aho-corasick",
"bstr",
di... | 2 | 2 | 2 |
7227e94ce5f661355a1547a1838284bb7ad5b815 | Andrew Gallant | 2023-08-04T18:05:54 | globset: use non-capture groups in regex transform
We currently implement globs by converting them to regexes, and in doing
so, sometimes use grouping. In all but one case, we used non-capturing
groups. But for alternations, we used capturing groups, which was likely
just an oversight. We don't make use of capture gro... | diff --git a/crates/globset/src/glob.rs b/crates/globset/src/glob.rs
index cda39ca..d19c70e 100644
--- a/crates/globset/src/glob.rs
+++ b/crates/globset/src/glob.rs
@@ -736,7 +736,7 @@ impl Tokens {
// It is possible to have an empty set in which case the
// resulting alternati... | 1 | 2 | 1 |
fed4fea217abbc502f2e823465de903c8f2b623d | Vidar | 2023-07-31T11:08:44 | ignore/types: add csproj
Supports the .NET C# Project file extension.
PR #2575 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index e138067..91a6cbc 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -55,6 +55,7 @@ pub const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
(&["cs"], &["*.cs"]),
(&["csharp"], &["*.cs... | 1 | 1 | 0 |
053a1669bb10482f0e09fd4faf9e80b1b5d1200a | Andrew Gallant | 2023-07-26T23:51:38 | globset-0.4.12 | diff --git a/Cargo.lock b/Cargo.lock
index d1bb6d4..3fe43a8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -119,7 +119,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "globset"
-version = "0.4.11"
+version = "0.4.12"
dependencies = [
"aho-corasick",
"bstr",
di... | 2 | 2 | 2 |
31d3f16254ec3f0c993d05be8f62dc81fc663406 | David Tolnay | 2023-07-26T23:51:22 | api: impl Deserialize for GlobSet
PR #2569 | diff --git a/crates/globset/src/serde_impl.rs b/crates/globset/src/serde_impl.rs
index d3777c2..88b1574 100644
--- a/crates/globset/src/serde_impl.rs
+++ b/crates/globset/src/serde_impl.rs
@@ -1,9 +1,9 @@
use serde::{
- de::{Error, Visitor},
+ de::{Error, SeqAccess, Visitor},
{Deserialize, Deserializer, Ser... | 1 | 44 | 4 |
304a60e8e9d4b2a42dc3dfb1ba4cef6d7bf92515 | Andrew Gallant | 2023-07-18T17:25:23 | grep-cli-0.1.9 | diff --git a/Cargo.lock b/Cargo.lock
index 094925b..d1bb6d4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -148,7 +148,7 @@ dependencies = [
[[package]]
name = "grep-cli"
-version = "0.1.8"
+version = "0.1.9"
dependencies = [
"bstr",
"globset",
diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml
index 3003... | 2 | 2 | 2 |
1d35859861fa4710cee94cf0e0b2e114b152b946 | Andrew Gallant | 2023-07-12T16:58:43 | globset-0.4.11 | diff --git a/Cargo.lock b/Cargo.lock
index 31a2c64..094925b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -119,7 +119,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "globset"
-version = "0.4.10"
+version = "0.4.11"
dependencies = [
"aho-corasick",
"bstr",
di... | 2 | 2 | 2 |
601e122e9fc94b3523d53e46eb734f54cfcc3134 | mataha | 2023-07-10T19:58:17 | ignore/types: add Windows Command Prompt files
This PR adds `*.bat` and `*.cmd` file types.
In doing so, it makes a distinction between batch files (old standard
from the MS-DOS era) and command scripts (new flavor - can operate on
batch files, although `*.cmd` is preferred for various reasons, the
main one bein... | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 0617075..e138067 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -24,6 +24,7 @@ pub const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
(&["ats"], &["*.ats", "*.dats", "*.sats", "*.hat... | 1 | 2 | 0 |
4782ebd5e0773465ba2c32a328250253c2b55779 | Garrett Thornburg | 2021-08-10T05:32:08 | core: lock stdout before printing an error message to stderr
Adds a new eprintln_locked macro which locks STDOUT before logging
to STDERR. This patch also replaces instances of eprintln with
eprintln_locked to avoid interleaving lines.
Fixes #1941, Closes #1968 | diff --git a/crates/core/logger.rs b/crates/core/logger.rs
index 0fe063f..0c5414c 100644
--- a/crates/core/logger.rs
+++ b/crates/core/logger.rs
@@ -33,7 +33,7 @@ impl Log for Logger {
fn log(&self, record: &log::Record<'_>) {
match (record.file(), record.line()) {
(Some(file), Some(line)) =>... | 3 | 23 | 7 |
4993d29a16b26b016b498765cc5636e73b479367 | piegames | 2021-11-12T17:39:03 | globset: add 'escape' routine
Fixes #2060, Closes #2061 | diff --git a/crates/globset/src/glob.rs b/crates/globset/src/glob.rs
index e025ddf..cda39ca 100644
--- a/crates/globset/src/glob.rs
+++ b/crates/globset/src/glob.rs
@@ -639,9 +639,9 @@ impl<'a> GlobBuilder<'a> {
}
/// Toggle whether an empty pattern in a list of alternates is accepted.
- ///
+ ///
... | 2 | 49 | 6 |
23adbd6795d4b0a7fbbb606d58fa82e3df0dabc2 | Seth Stadick | 2021-07-22T13:54:19 | cli: force binary existance check
Previously, we were only doing a binary existence check on Windows. And
in fact, the main point there wasn't binary existence, but ensuring we
didn't accidentally resolve a binary name relative to the CWD, which
could result in executing a program one didn't mean to run.
However, it ... | diff --git a/crates/cli/src/decompress.rs b/crates/cli/src/decompress.rs
index 0ef546b..72eefdd 100644
--- a/crates/cli/src/decompress.rs
+++ b/crates/cli/src/decompress.rs
@@ -132,7 +132,7 @@ impl DecompressionMatcherBuilder {
A: AsRef<OsStr>,
{
let glob = glob.to_string();
- let bin = re... | 1 | 30 | 2 |
9df8ab42b1ebdb11562b6413e25e63f6d410a4a5 | Kevin Svetlitski | 2021-07-19T23:32:59 | cargo: reduce the size of the .crate file published to crates.io
None of this stuff is needed for the main ripgrep crate.
Closes #1940 | diff --git a/Cargo.toml b/Cargo.toml
index bd9ee7c..ac4c9b4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,14 @@ repository = "https://github.com/BurntSushi/ripgrep"
keywords = ["regex", "grep", "egrep", "search", "pattern"]
categories = ["command-line-utilities", "text-processing"]
license = "Unlicense OR MI... | 1 | 8 | 1 |
cb7501ff111d32f636138cfc8975289fc5001f50 | Michal Terepeta | 2021-10-24T13:40:52 | doc: clarify the comment on `Worker.work_done`
We call `work_done` only once the work has been actually performed
(otherwise `num_pending` could go to 0 before the actual work is done).
Closes #2039 | diff --git a/crates/ignore/src/walk.rs b/crates/ignore/src/walk.rs
index 602faae..1f7d06e 100644
--- a/crates/ignore/src/walk.rs
+++ b/crates/ignore/src/walk.rs
@@ -1681,7 +1681,7 @@ impl<'s> Worker<'s> {
stack.pop()
}
- /// Signal that work has been received.
+ /// Signal that work has been finis... | 1 | 1 | 1 |
f30a30867e2ad79ca7b556e5c0dbbe8c58a89267 | kotborealis | 2021-06-15T14:00:35 | ignore/types: name aliases for file types
We also make py/python, md/markdown and ts/typescript aliases of one
another.
Note that this only introduces aliases at the point where default types
are defined. This just makes them a bit easier to read/write, and also
makes it easier to expose more names that describe the ... | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 6288adf..0617075 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -9,111 +9,111 @@
/// Please try to keep this list sorted lexicographically and wrapped to 79
/// columns (inclusive).
... | 2 | 208 | 213 |
7c83b90f95663d4215b4709f00fd0975277f0755 | Ludi Rehak | 2022-03-02T06:35:05 | doc: fix typo
Closes #2153 | diff --git a/crates/regex/src/literal.rs b/crates/regex/src/literal.rs
index e52fb89..831b82c 100644
--- a/crates/regex/src/literal.rs
+++ b/crates/regex/src/literal.rs
@@ -91,7 +91,7 @@ impl InnerLiterals {
InnerLiterals { seq: Seq::infinite() }
}
- /// If it is deemed advantageuous to do so (via va... | 1 | 1 | 1 |
97b5b7769c717078515eb2f461a9ed2b3befaf6c | cuishuang | 2022-04-24T09:00:39 | doc: fix some typos
Closes #2195 | diff --git a/crates/cli/src/decompress.rs b/crates/cli/src/decompress.rs
index f2f2a67..0ef546b 100644
--- a/crates/cli/src/decompress.rs
+++ b/crates/cli/src/decompress.rs
@@ -18,7 +18,7 @@ pub struct DecompressionMatcherBuilder {
}
/// A representation of a single command for decompressing data
-/// out-of-procce... | 2 | 2 | 2 |
cfe357188d2fbd621b7d5f7f4139f19f0c88ca09 | Andrew Gallant | 2023-07-08T13:04:07 | ignore/types: fix formatting | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 30cb675..64fb44d 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -152,7 +152,14 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
]),
("mako", &["*.mako", "*.mao"]),
("... | 1 | 8 | 1 |
f34fd5c4b68480f5969b94709f54d493e79b3257 | Alex Rawson | 2022-12-10T22:35:07 | globset: introduce option to keep empty alternates
Add a method GlobBuilder::empty_alternates and supporting mechanisms.
Ref #1368
Closes #2369 | diff --git a/crates/globset/src/glob.rs b/crates/globset/src/glob.rs
index 6e35aee..e025ddf 100644
--- a/crates/globset/src/glob.rs
+++ b/crates/globset/src/glob.rs
@@ -208,6 +208,9 @@ struct GlobOptions {
/// Whether or not to use `\` to escape special characters.
/// e.g., when enabled, `\*` will match a li... | 1 | 37 | 5 |
d51c6c005aaac90329f61baa20821fafc96b841a | Jérome Eertmans | 2023-01-01T13:28:22 | globset: permit deserializing Glob from String
Closes #2386, Closes #2388 | diff --git a/crates/globset/src/serde_impl.rs b/crates/globset/src/serde_impl.rs
index 2004ce8..d3777c2 100644
--- a/crates/globset/src/serde_impl.rs
+++ b/crates/globset/src/serde_impl.rs
@@ -1,5 +1,7 @@
-use serde::de::Error;
-use serde::{Deserialize, Deserializer, Serialize, Serializer};
+use serde::{
+ de::{Erro... | 1 | 54 | 4 |
43bbcca06f0aab493b5f8c85ea2f7caf4fa3f7c4 | Misaki | 2023-03-15T21:51:08 | doc: note '-n' and '-N' override each other
Closes #2460 | diff --git a/crates/core/app.rs b/crates/core/app.rs
index cd4875f..1fac532 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -1711,6 +1711,8 @@ fn flag_line_number(args: &mut Vec<RGArg>) {
"\
Show line numbers (1-based). This is enabled by default when searching in a
terminal.
+
+This flag overrid... | 1 | 4 | 0 |
ad9bfdd98189ebeab3df945771a1a88e9b37c19a | Eric Arellano | 2023-04-01T19:12:32 | ignore/gitignore: expose `gitconfig_excludes_path`
I have reservations about this, but it looks useful and doesn't seem
terribly onerous to support. The `ignore` crate will really always need
to have some kind of logic supporting this in some form I think.
Closes #2482 | diff --git a/crates/ignore/src/gitignore.rs b/crates/ignore/src/gitignore.rs
index b420393..9aeef66 100644
--- a/crates/ignore/src/gitignore.rs
+++ b/crates/ignore/src/gitignore.rs
@@ -533,7 +533,7 @@ impl GitignoreBuilder {
/// Return the file path of the current environment's global gitignore file.
///
/// Note th... | 1 | 1 | 1 |
0c1cbd99f36e4b97cbb915e9c5a7c0c091522105 | Jakub Jirutka | 2023-04-29T15:04:00 | ignore: tweak regex crate features
This removes most of the Unicode features as they aren't currently
used. We can always add them back later if necessary.
We can avoid the unicode-perl feature by changing `\s` to `[[:space:]]`,
which uses the ASCII-only definition of `\s`. Since we don't expect
non-ASCII whitespace ... | diff --git a/crates/ignore/Cargo.toml b/crates/ignore/Cargo.toml
index b946e2d..a9495aa 100644
--- a/crates/ignore/Cargo.toml
+++ b/crates/ignore/Cargo.toml
@@ -23,7 +23,7 @@ globset = { version = "0.4.10", path = "../globset" }
lazy_static = "1.1"
log = "0.4.5"
memchr = "2.5"
-regex = "1.8.3"
+regex = { version = "... | 2 | 8 | 3 |
545a7dc7598a20e8ef82076177164b7e3ccb15e4 | Yifei Teng | 2023-06-07T20:40:01 | ignore/types: add cml to the default types list
It's used in Fuchsia to mean "component manifest language."[1]
[1]: https://fuchsia.dev/reference/cml?hl=en
Closes #2529 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index e588312..0fedf13 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -38,6 +38,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("ceylon", &["*.ceylon"]),
("clojure", &["*.cl... | 1 | 1 | 0 |
f4d07b9cbdcf7d52e63f35fe76279e99a17492ef | Andrew Gallant | 2023-07-05T21:09:09 | grep-cli-0.1.8 | diff --git a/Cargo.lock b/Cargo.lock
index 66a2b7d..31a2c64 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -148,7 +148,7 @@ dependencies = [
[[package]]
name = "grep-cli"
-version = "0.1.7"
+version = "0.1.8"
dependencies = [
"bstr",
"globset",
diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml
index c6c5... | 2 | 2 | 2 |
3ac4541e9fb83ba4fc67dbbd26082d0523e87743 | Andrew Gallant | 2023-07-05T15:09:58 | regex: remove old inner literal extractor
(It had already been removed from the crate.) | diff --git a/crates/regex/src/literalold.rs b/crates/regex/src/literalold.rs
deleted file mode 100644
index df73a45..0000000
--- a/crates/regex/src/literalold.rs
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
-This module is responsible for extracting *inner* literals out of the AST of a
-regular expression. Normally this is the ... | 1 | 0 | 466 |
7b72e982f290983bf83ad0470eda784e6eab5735 | Andrew Gallant | 2023-07-05T15:08:52 | deps: update everything | diff --git a/Cargo.lock b/Cargo.lock
index 8efad79..66a2b7d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -236,9 +236,9 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe... | 1 | 16 | 16 |
a68db3ac02fbfa2154cb2c8029c39e89d24c2792 | Andrew Gallant | 2023-07-05T15:08:13 | deps: drop temporary patch and move to bstr 1.6
Now that regex 1.9 is out, we can depend on it from crates.io. | diff --git a/Cargo.lock b/Cargo.lock
index 4ab7ee6..8efad79 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -25,13 +25,12 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bstr"
-version = "1.5.0"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crat... | 7 | 19 | 25 |
b12905daca8a1659e039af4e09affbc82e2de8af | Andrew Gallant | 2023-06-29T01:36:14 | deps: update everything | diff --git a/Cargo.lock b/Cargo.lock
index cd03344..4ab7ee6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -278,9 +278,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.146"
+version = "0.2.147"
source = "registry+https://github.com/rust-lang/... | 1 | 8 | 8 |
ca740d9ace9065103036c101ca973b79e59ae85a | Andrew Gallant | 2023-06-22T00:38:02 | regex: add new inner literal extractor
This is mostly a copy of the prefix literal extractor in regex-syntax,
but with a tweaked notion of Seq that keeps track of whether it's a
prefix of an expression or not. If it isn't, then we can't cross it as a
suffix to another Seq.
This new extractor should be a lot more robu... | diff --git a/crates/regex/src/literal.rs b/crates/regex/src/literal.rs
index 518e54b..e52fb89 100644
--- a/crates/regex/src/literal.rs
+++ b/crates/regex/src/literal.rs
@@ -1,15 +1,42 @@
-#![allow(warnings)]
-
use {
regex_automata::meta::Regex,
regex_syntax::hir::{
- literal::{self, Seq},
+ sel... | 2 | 958 | 19 |
e80c102dee181a623b802e610fe17548fa877c6f | Andrew Gallant | 2023-06-22T00:37:06 | regex: tweak formatting of regex-automata version spec
This makes it easier to enable the `logging` feature for regex-automata.
I wish I could just enable it unconditionally, but it winds up producing
a lot of output because ripgrep uses regexes for things other than the
primary search (like every glob). Sigh. | diff --git a/crates/regex/Cargo.toml b/crates/regex/Cargo.toml
index 039f0b0..a844ad5 100644
--- a/crates/regex/Cargo.toml
+++ b/crates/regex/Cargo.toml
@@ -18,5 +18,5 @@ aho-corasick = "1.0.2"
bstr = "1.5.0"
grep-matcher = { version = "0.1.6", path = "../matcher" }
log = "0.4.19"
-regex-automata = "0.3.0"
+regex-au... | 1 | 1 | 1 |
8ac66a9e0461b0c50a5f69508f0740d893426d3d | Andrew Gallant | 2023-06-20T17:05:57 | regex: refactor matcher construction
This does a little bit of refactoring so that we can pass both a
ConfiguredHIR and a Regex to the inner literal extraction routine.
One downside of this approach is that a regex object hangs on to a
ConfiguredHIR. But the extra memory usage is probably negligible. A
benefit though... | diff --git a/crates/regex/src/config.rs b/crates/regex/src/config.rs
index d767def..7964258 100644
--- a/crates/regex/src/config.rs
+++ b/crates/regex/src/config.rs
@@ -8,8 +8,8 @@ use {
};
use crate::{
- ast::AstAnalysis, error::Error, literal::LiteralSets,
- non_matching::non_matching_bytes, strip::strip_fr... | 4 | 111 | 76 |
04dde9a4eb5bbf6856e0a4ad16a6a9e3f1dd38ab | Andrew Gallant | 2023-06-20T12:09:23 | regex: tweak DFA settings
This increases the limits a bit for when the regex engine will build and
use a fully compiled DFA. They can faster in some circumstances. For
example, '(?-u)^\w{30,}$' gets a nice speed boost from state
acceleration.
We are also able to remove `regex` proper as a dependency. Wow. | diff --git a/Cargo.lock b/Cargo.lock
index aa01606..cd03344 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -200,7 +200,6 @@ dependencies = [
"bstr",
"grep-matcher",
"log",
- "regex",
"regex-automata 0.3.0",
"regex-syntax",
]
diff --git a/crates/regex/Cargo.toml b/crates/regex/Cargo.toml
index 8aece18..039f0b0 1... | 3 | 10 | 3 |
d34c5c88a7fb621af48e993e8f25bca4cbdb1597 | Andrew Gallant | 2023-06-18T17:16:22 | globset: fix build error in tests
I guess we haven't been testing with the Serde feature enabled? Weird. | diff --git a/crates/globset/src/serde_impl.rs b/crates/globset/src/serde_impl.rs
index 6affc59..2004ce8 100644
--- a/crates/globset/src/serde_impl.rs
+++ b/crates/globset/src/serde_impl.rs
@@ -23,7 +23,7 @@ impl<'de> Deserialize<'de> for Glob {
#[cfg(test)]
mod tests {
- use Glob;
+ use crate::Glob;
#[... | 1 | 1 | 1 |
4b8aa91ae5b17bd988ed05ab5c7c387de9247b13 | Andrew Gallant | 2023-06-18T17:07:48 | deps: update to pcre2 0.2.4
0.2.4 updates to PCRE2 10.42 and has a few other nice changes. For
example, when `utf` is enabled, the crate will always set the
PCRE2_MATCH_INVALID_UTF option. That means we no longer need to do
transcoding or UTF-8 validity checks.
Because of this, we actually get to remove one of the tw... | diff --git a/Cargo.lock b/Cargo.lock
index 3f4bc49..597aa63 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -80,9 +80,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.15"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c063cd8cc95f5c377ed0d4b... | 4 | 25 | 59 |
a775b493fd0d8dc23bdf43bbffe6d4c9f449e2ee | Andrew Gallant | 2023-06-18T01:47:37 | regex: small cleanups
Just some small polishing. We also get rid of thread_local in favor of
using regex-automata, mostly just in the name of reducing dependencies.
(We should eventually be able to drop thread_local completely.) | diff --git a/Cargo.lock b/Cargo.lock
index b86f49d..3f4bc49 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -202,7 +202,6 @@ dependencies = [
"regex",
"regex-automata 0.3.0",
"regex-syntax",
- "thread_local",
]
[[package]]
diff --git a/crates/regex/Cargo.toml b/crates/regex/Cargo.toml
index f564b0e..13d2e5e 10064... | 5 | 62 | 51 |
a6dbff502f1e0ce3401ea0b2a7a8a33bd12f5053 | Andrew Gallant | 2023-06-17T14:04:54 | regex: s/locations/captures
Now that we use regex-automata, we no longer use any type with
"locations" in it. Instead, that's mostly legacy from the top-level
regex crate. | diff --git a/crates/regex/src/error.rs b/crates/regex/src/error.rs
index cd7939d..88a8adb 100644
--- a/crates/regex/src/error.rs
+++ b/crates/regex/src/error.rs
@@ -14,7 +14,6 @@ impl Error {
}
pub(crate) fn regex(err: regex_automata::meta::BuildError) -> Error {
- // Error { kind: ErrorKind::Regex(e... | 3 | 23 | 24 |
51480d57a67c229d624e5d1edb4aa3782e883696 | Andrew Gallant | 2023-06-17T14:00:07 | regex: simplify AST analysis a bit
The verbatim literal stuff hasn't been used for a while and I don't
foresee it being used. If it's really needed, it would probably better
to just implement it by looking at the pattern string itself, which
avoids parsing it into an AST altogether. | diff --git a/crates/regex/src/ast.rs b/crates/regex/src/ast.rs
index a4979de..4d17056 100644
--- a/crates/regex/src/ast.rs
+++ b/crates/regex/src/ast.rs
@@ -1,17 +1,13 @@
-use regex_syntax::ast::parse::Parser;
use regex_syntax::ast::{self, Ast};
/// The results of analyzing AST of a regular expression (e.g., for su... | 1 | 10 | 57 |
d9bd261be8c52a280f767e5165de5dba6152830c | Andrew Gallant | 2023-06-16T19:01:30 | regex: some small cleanup in 'strip.rs'
We also utilize bstr's methods to get rid of some helpers we had written
by hand. | diff --git a/crates/regex/Cargo.toml b/crates/regex/Cargo.toml
index 52293a3..f564b0e 100644
--- a/crates/regex/Cargo.toml
+++ b/crates/regex/Cargo.toml
@@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/regex"
readme = "README.md"
keywords = ["regex", "grep", "search", "pattern"... | 5 | 48 | 61 |
9d62eb997a19efbf5e96d28870f8edad9bde1b9b | Andrew Gallant | 2023-06-16T18:36:27 | BREAKING: regex: finally remove CRLF hack
Now that Rust's regex crate finally supports a CRLF mode, we can remove
this giant hack in ripgrep to enable it. (And assuredly did not work in
all cases.)
The way this works in the regex engine is actually subtly different than
what ripgrep previously did. Namely, --crlf wou... | diff --git a/crates/regex/src/config.rs b/crates/regex/src/config.rs
index ed1c2f8..8d785b6 100644
--- a/crates/regex/src/config.rs
+++ b/crates/regex/src/config.rs
@@ -6,7 +6,7 @@ use {
};
use crate::{
- ast::AstAnalysis, crlf::crlfify, error::Error, literal::LiteralSets,
+ ast::AstAnalysis, error::Error, li... | 4 | 9 | 288 |
e028ea37928930c80e5c3172d1df306b85a86758 | Andrew Gallant | 2023-06-15T19:05:07 | regex: migrate grep-regex to regex-automata
We just do a "basic" dumb migration. We don't try to improve anything
here. | diff --git a/Cargo.lock b/Cargo.lock
index a721f8c..b86f49d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -200,6 +200,7 @@ dependencies = [
"grep-matcher",
"log",
"regex",
+ "regex-automata 0.3.0",
"regex-syntax",
"thread_local",
]
diff --git a/crates/globset/src/lib.rs b/crates/globset/src/lib.rs
index 8ea9af... | 12 | 237 | 129 |
949092fd22689905fce358cdd1b2b676709feefe | Francois Marier | 2023-05-26T18:44:41 | ignore/types: add 'mdwn' to Markdown
PR #2520 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 6d7875c..e588312 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -150,9 +150,9 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
]),
("mako", &["*.mako", "*.mao"]),
("m... | 1 | 2 | 2 |
4a7e7094ad1f0c07bb38277eb1f61645adb855e2 | Andrew Gallant | 2023-05-25T17:06:02 | deps: update everything else | diff --git a/Cargo.lock b/Cargo.lock
index b1bc429..9b70ec0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -45,9 +45,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bstr"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates... | 1 | 6 | 6 |
fc0d9b90a9dbc1ba8d93a3f58da4ddbac0c40a7f | Andrew Gallant | 2023-05-25T17:05:23 | deps: bump regex to 1.8.3
This brings in an update from the regex crate that fixes a matching bug
for particular kinds of alternations of literals.
Fixes #2518 | diff --git a/Cargo.lock b/Cargo.lock
index 7975bb7..b1bc429 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -407,13 +407,13 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.8.1"
+version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af83e617f331cc6ae2da5443c602dfa5... | 1 | 5 | 5 |
335aa4937aed8f9c1bf3f5722e8fc4d671d46dcb | Ville Skyttä | 2023-05-23T11:10:02 | ignore/types: add *.pyi for Python
https://peps.python.org/pep-0484/#stub-files
PR #2517 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index fff815b..6d7875c 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -186,7 +186,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("ps", &["*.cdxml", "*.ps1", "*.ps1xml", "*.psd1"... | 1 | 1 | 1 |
803c44784509d31a8abb4297acda19bd680f667a | Adam Reichold | 2023-05-19T12:23:53 | searcher: re-enable mmap on 32-bit architectures
memmap2 v0.3.0 introduced a regression when trying to map files larger than 4GB
on 32-bit architectures[1] which was subsequently fixed in v0.3.1[2].
This commit bumps locked version of the memmap2 dependency to the current v0.5.0
and reverts fdfc418be55ff91e0c2efa... | diff --git a/crates/searcher/src/searcher/mmap.rs b/crates/searcher/src/searcher/mmap.rs
index 83fc423..0ab2d53 100644
--- a/crates/searcher/src/searcher/mmap.rs
+++ b/crates/searcher/src/searcher/mmap.rs
@@ -71,16 +71,6 @@ impl MmapChoice {
if !self.is_enabled() {
return None;
}
- ... | 1 | 0 | 10 |
c5415adbe8b1640ba097b420599dd33c7b5f2eaf | Andrew Gallant | 2023-05-16T17:14:23 | deps: update everything
This does unfortunately bring in both regex-syntax 0.6 and 0.7, but
we'll fix that once regex 1.9 is out. | diff --git a/Cargo.lock b/Cargo.lock
index 1feed3c..7975bb7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,6 +11,15 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "aho-corasick"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67fc08ce920c31afb70f013dcce1bfc3... | 1 | 73 | 65 |
251376597f808d78c11b86a4405b869e34d24658 | Andrew Gallant | 2023-05-16T17:13:34 | deps: update minimum version of grep crate
Ref #2516 | diff --git a/Cargo.toml b/Cargo.toml
index 7034e29..662773c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,7 +43,7 @@ members = [
[dependencies]
bstr = "1.1.0"
-grep = { version = "0.2.11", path = "crates/grep" }
+grep = { version = "0.2.12", path = "crates/grep" }
ignore = { version = "0.4.19", path = "crates/ig... | 1 | 1 | 1 |
e593f5b7ee314005f51be9124e4ee52d06eaa17a | Andrew Gallant | 2023-05-16T17:12:45 | grep-0.2.12 | diff --git a/Cargo.lock b/Cargo.lock
index b7bb8ae..1feed3c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -152,7 +152,7 @@ dependencies = [
[[package]]
name = "grep"
-version = "0.2.11"
+version = "0.2.12"
dependencies = [
"grep-cli",
"grep-matcher",
diff --git a/crates/grep/Cargo.toml b/crates/grep/Cargo.toml
i... | 2 | 2 | 2 |
6b19be24776db74dd2df0bdbd5f199a8cd9964ce | Andrew Gallant | 2023-05-16T17:10:42 | crates/grep: remove 'deny(missing_docs)'
This crate is only a shim over a bunch of other crates. I'm not sure
that there's anything to add to each of the `pub extern` items. So
instead of just writing fluff, I removed the lint.
Fixes #2516 | diff --git a/crates/grep/src/lib.rs b/crates/grep/src/lib.rs
index 13eaee2..6c88bf7 100644
--- a/crates/grep/src/lib.rs
+++ b/crates/grep/src/lib.rs
@@ -12,8 +12,6 @@ are sparse.
A cookbook and a guide are planned.
*/
-#![deny(missing_docs)]
-
pub extern crate grep_cli as cli;
pub extern crate grep_matcher as mat... | 1 | 0 | 2 |
041544853c86dde91c49983e5ddd0aa799bd2831 | Ryan Whitehouse | 2023-03-28T11:22:59 | doc: fix --quiet docs
The wording was previously inverted, which had the opposite
meaning as was intended.
Fixes #1962 | diff --git a/crates/core/app.rs b/crates/core/app.rs
index 51527fe..cd4875f 100644
--- a/crates/core/app.rs
+++ b/crates/core/app.rs
@@ -2583,8 +2583,8 @@ Do not print anything to stdout. If a match is found in a file, then ripgrep
will stop searching. This is useful when ripgrep is used only for its exit
code (which... | 1 | 2 | 2 |
a7ae9e4043533ba1b6e2f63b989b84f27d961b37 | Manu | 2023-03-21T16:56:38 | ignore/types: add support for docker-compose files
Default file is docker-compose.yml and the documentation
mentions overrides in the form of docker-compose.*.yml.
PR #2469 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index edb0af0..fff815b 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -60,6 +60,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("dhall", &["*.dhall"]),
("diff", &["*.patch",... | 1 | 1 | 0 |
44fb9fce2c1ee1a86c450702ea3ca2952bf6c5a7 | David Ringo | 2023-02-10T02:20:49 | ignore/types: add *.sln for msbuild
.sln is the extension for Visual Studio Project Soltion files, one of
the file types accepted as inputs by MSBuild.
PR #2415 | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index c0ca95b..edb0af0 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -160,6 +160,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("motoko", &["*.mo"]),
("msbuild", &[
... | 1 | 1 | 0 |
339c46a6edb336a42d54b0b41cbb29491a6a8573 | Vincent Bockaert | 2023-02-09T17:57:01 | ignore/types: enhance terraform default filter
The default filter for terraform only checks for *.tf files, but there
are quite few other terraform filetypes.
The explanation for all of them can be found below (including link to
documentation from Hashicorp at time of writing)
- *.tf.json & *.tfvars.json is to... | diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index e6a3a8f..c0ca95b 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -251,7 +251,11 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("tex", &["*.tex", "*.ltx", "*.cls", "*.sty", "*... | 1 | 5 | 1 |
fe97c0a152cabc1bc07ec36b4b1e27cd230c3014 | Andrew Gallant | 2023-01-15T13:21:02 | ignore-0.4.20 | diff --git a/Cargo.lock b/Cargo.lock
index 2eb2049..b7bb8ae 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -248,7 +248,7 @@ dependencies = [
[[package]]
name = "ignore"
-version = "0.4.19"
+version = "0.4.20"
dependencies = [
"crossbeam-channel",
"globset",
diff --git a/crates/ignore/Cargo.toml b/crates/ignore/Ca... | 2 | 2 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.