mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-30 03:31:57 -07:00
Compare commits
10 Commits
grep-searc
...
grep-regex
Author | SHA1 | Date | |
---|---|---|---|
|
543f99dbf1 | ||
|
0ea65efd6d | ||
|
20deae6497 | ||
|
655e33219a | ||
|
8ba6ccd159 | ||
|
34edb8123a | ||
|
5b30c2aed6 | ||
|
bf1027a83e | ||
|
031264e5fb | ||
|
b9cd95faf1 |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
create-release:
|
create-release:
|
||||||
name: create-release
|
name: create-release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
# env:
|
||||||
# Set to force version number, e.g., when no tag exists.
|
# Set to force version number, e.g., when no tag exists.
|
||||||
# RG_VERSION: TEST-0.0.0
|
# RG_VERSION: TEST-0.0.0
|
||||||
steps:
|
steps:
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.RG_VERSION }}
|
tag_name: ${{ env.RG_VERSION }}
|
||||||
release_name: ripgrep ${{ env.RG_VERSION }}
|
release_name: ${{ env.RG_VERSION }}
|
||||||
|
|
||||||
- name: Save release upload URL to artifact
|
- name: Save release upload URL to artifact
|
||||||
run: echo "${{ steps.release.outputs.upload_url }}" > artifacts/release-upload-url
|
run: echo "${{ steps.release.outputs.upload_url }}" > artifacts/release-upload-url
|
||||||
|
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,3 +1,14 @@
|
|||||||
|
12.0.1 (TBD)
|
||||||
|
============
|
||||||
|
ripgrep 12.0.1 is a small patch release that includes a couple minor bug fixes.
|
||||||
|
These bug fixes address regressions introduced in the 12.0.0 release.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* [BUG #1520](https://github.com/BurntSushi/ripgrep/issues/1520):
|
||||||
|
Don't emit spurious error messages in git repositories with submodules.
|
||||||
|
|
||||||
|
|
||||||
12.0.0 (2020-03-15)
|
12.0.0 (2020-03-15)
|
||||||
===================
|
===================
|
||||||
ripgrep 12 is a new major version release of ripgrep that contains many bug
|
ripgrep 12 is a new major version release of ripgrep that contains many bug
|
||||||
|
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -148,7 +148,7 @@ dependencies = [
|
|||||||
"grep-matcher 0.1.4",
|
"grep-matcher 0.1.4",
|
||||||
"grep-pcre2 0.1.4",
|
"grep-pcre2 0.1.4",
|
||||||
"grep-printer 0.1.4",
|
"grep-printer 0.1.4",
|
||||||
"grep-regex 0.1.6",
|
"grep-regex 0.1.7",
|
||||||
"grep-searcher 0.1.7",
|
"grep-searcher 0.1.7",
|
||||||
"termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -192,7 +192,7 @@ dependencies = [
|
|||||||
"base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bstr 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bstr 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep-matcher 0.1.4",
|
"grep-matcher 0.1.4",
|
||||||
"grep-regex 0.1.6",
|
"grep-regex 0.1.7",
|
||||||
"grep-searcher 0.1.7",
|
"grep-searcher 0.1.7",
|
||||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -202,7 +202,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-regex"
|
name = "grep-regex"
|
||||||
version = "0.1.6"
|
version = "0.1.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bstr 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bstr 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -222,7 +222,7 @@ dependencies = [
|
|||||||
"encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding_rs_io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs_io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"grep-matcher 0.1.4",
|
"grep-matcher 0.1.4",
|
||||||
"grep-regex 0.1.6",
|
"grep-regex 0.1.7",
|
||||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@@ -20,8 +20,8 @@ autotests = false
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
travis-ci = { repository = "BurntSushi/ripgrep" }
|
# I guess crates.io does not support GitHub Action badges yet.
|
||||||
appveyor = { repository = "BurntSushi/ripgrep" }
|
# Tracking PR: https://github.com/rust-lang/crates.io/pull/1838
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
bench = false
|
bench = false
|
||||||
|
@@ -29,7 +29,8 @@ mkdir -p "$DEPLOY_DIR"
|
|||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
# Copy man page and shell completions.
|
# Copy man page and shell completions.
|
||||||
cp "$OUT_DIR"/{rg.1,rg.bash,rg.fish,_rg} "$DEPLOY_DIR/"
|
cp "$OUT_DIR"/{rg.1,rg.bash,rg.fish} "$DEPLOY_DIR/"
|
||||||
|
cp complete/_rg "$DEPLOY_DIR/"
|
||||||
|
|
||||||
# Since we're distributing the dpkg, we don't know whether the user will have
|
# Since we're distributing the dpkg, we don't know whether the user will have
|
||||||
# PCRE2 installed, so just do a static build.
|
# PCRE2 installed, so just do a static build.
|
||||||
|
@@ -310,7 +310,7 @@ impl Ignore {
|
|||||||
git_global_matcher: self.0.git_global_matcher.clone(),
|
git_global_matcher: self.0.git_global_matcher.clone(),
|
||||||
git_ignore_matcher: gi_matcher,
|
git_ignore_matcher: gi_matcher,
|
||||||
git_exclude_matcher: gi_exclude_matcher,
|
git_exclude_matcher: gi_exclude_matcher,
|
||||||
has_git: has_git,
|
has_git,
|
||||||
opts: self.0.opts,
|
opts: self.0.opts,
|
||||||
};
|
};
|
||||||
(ig, errs.into_error_option())
|
(ig, errs.into_error_option())
|
||||||
@@ -817,9 +817,7 @@ fn resolve_git_commondir(
|
|||||||
let git_commondir_file = || real_git_dir.join("commondir");
|
let git_commondir_file = || real_git_dir.join("commondir");
|
||||||
let file = match File::open(git_commondir_file()) {
|
let file = match File::open(git_commondir_file()) {
|
||||||
Ok(file) => io::BufReader::new(file),
|
Ok(file) => io::BufReader::new(file),
|
||||||
Err(err) => {
|
Err(_) => return Err(None),
|
||||||
return Err(Some(Error::Io(err).with_path(git_commondir_file())));
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
let commondir_line = match file.lines().next() {
|
let commondir_line = match file.lines().next() {
|
||||||
Some(Ok(line)) => line,
|
Some(Ok(line)) => line,
|
||||||
@@ -839,7 +837,7 @@ fn resolve_git_commondir(
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::fs::{self, File};
|
use std::fs::{self, File};
|
||||||
use std::io::{self, Write};
|
use std::io::Write;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use dir::IgnoreBuilder;
|
use dir::IgnoreBuilder;
|
||||||
@@ -1172,22 +1170,9 @@ mod tests {
|
|||||||
// missing commondir file
|
// missing commondir file
|
||||||
assert!(fs::remove_file(commondir_path()).is_ok());
|
assert!(fs::remove_file(commondir_path()).is_ok());
|
||||||
let (_, err) = ib.add_child(td.path().join("linked-worktree"));
|
let (_, err) = ib.add_child(td.path().join("linked-worktree"));
|
||||||
assert!(err.is_some());
|
// We squash the error in this case, because it occurs in repositories
|
||||||
assert!(match err {
|
// that are not linked worktrees but have submodules.
|
||||||
Some(Error::WithPath { path, err }) => {
|
assert!(err.is_none());
|
||||||
if path != commondir_path() {
|
|
||||||
false
|
|
||||||
} else {
|
|
||||||
match *err {
|
|
||||||
Error::Io(ioerr) => {
|
|
||||||
ioerr.kind() == io::ErrorKind::NotFound
|
|
||||||
}
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => false,
|
|
||||||
});
|
|
||||||
|
|
||||||
wfile(td.path().join("linked-worktree/.git"), "garbage");
|
wfile(td.path().join("linked-worktree/.git"), "garbage");
|
||||||
let (_, err) = ib.add_child(td.path().join("linked-worktree"));
|
let (_, err) = ib.add_child(td.path().join("linked-worktree"));
|
||||||
@@ -1195,6 +1180,6 @@ mod tests {
|
|||||||
|
|
||||||
wfile(td.path().join("linked-worktree/.git"), "gitdir: garbage");
|
wfile(td.path().join("linked-worktree/.git"), "gitdir: garbage");
|
||||||
let (_, err) = ib.add_child(td.path().join("linked-worktree"));
|
let (_, err) = ib.add_child(td.path().join("linked-worktree"));
|
||||||
assert!(err.is_some());
|
assert!(err.is_none());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-regex"
|
name = "grep-regex"
|
||||||
version = "0.1.6" #:version
|
version = "0.1.7" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Use Rust's regex library with the 'grep' crate.
|
Use Rust's regex library with the 'grep' crate.
|
||||||
|
@@ -141,6 +141,9 @@ impl LiteralSets {
|
|||||||
// (Not in theory---it could be better. But the current
|
// (Not in theory---it could be better. But the current
|
||||||
// implementation isn't good enough.) ... So we make up for it
|
// implementation isn't good enough.) ... So we make up for it
|
||||||
// here.
|
// here.
|
||||||
|
if !word {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
let p_min_len = self.prefixes.min_len();
|
let p_min_len = self.prefixes.min_len();
|
||||||
let s_min_len = self.suffixes.min_len();
|
let s_min_len = self.suffixes.min_len();
|
||||||
let lits = match (p_min_len, s_min_len) {
|
let lits = match (p_min_len, s_min_len) {
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
class RipgrepBin < Formula
|
class RipgrepBin < Formula
|
||||||
version '11.0.2'
|
version '12.0.0'
|
||||||
desc "Recursively search directories for a regex pattern."
|
desc "Recursively search directories for a regex pattern."
|
||||||
homepage "https://github.com/BurntSushi/ripgrep"
|
homepage "https://github.com/BurntSushi/ripgrep"
|
||||||
|
|
||||||
if OS.mac?
|
if OS.mac?
|
||||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
||||||
sha256 "0ba26423691deedf2649b12b1abe3d2be294ee1cb17c40b68fe85efe194f4f57"
|
sha256 "ebbc518ac019fc78b6429ec2e64b823c59b15a6f942436f43b9afc23c9aad9ea"
|
||||||
elsif OS.linux?
|
elsif OS.linux?
|
||||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
||||||
sha256 "2e7978e346553fbc45c0940d9fa11e12f9afbae8213b261aad19b698150e169a"
|
sha256 "ab3c8b4b030102d8fcdde62d3467ea5219e65aa3b42d268e85e9d1c14624149a"
|
||||||
end
|
end
|
||||||
|
|
||||||
conflicts_with "ripgrep"
|
conflicts_with "ripgrep"
|
||||||
|
@@ -511,7 +511,7 @@ rgtest!(context_line_numbers, |dir: Dir, mut cmd: TestCommand| {
|
|||||||
eqnice!(expected, cmd.stdout());
|
eqnice!(expected, cmd.stdout());
|
||||||
});
|
});
|
||||||
|
|
||||||
rgtest!(max_filesize_parse_errro_length, |_: Dir, mut cmd: TestCommand| {
|
rgtest!(max_filesize_parse_error_length, |_: Dir, mut cmd: TestCommand| {
|
||||||
cmd.arg("--max-filesize").arg("44444444444444444444");
|
cmd.arg("--max-filesize").arg("44444444444444444444");
|
||||||
cmd.assert_non_empty_stderr();
|
cmd.assert_non_empty_stderr();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user