Skip to content

Commit e03e4c1

Browse files
committed
Merge branch 'master' of https://github.com/burntsushi/ripgrep
2 parents 5bf038b + 7e05cde commit e03e4c1

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ then ripgrep can be installed using a binary `.deb` file provided in each
272272
[ripgrep release](https://github.com/BurntSushi/ripgrep/releases).
273273

274274
```
275-
$ curl -LO https://github.com/BurntSushi/ripgrep/releases/download/12.1.1/ripgrep_12.1.1_amd64.deb
276-
$ sudo dpkg -i ripgrep_12.1.1_amd64.deb
275+
$ curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb
276+
$ sudo dpkg -i ripgrep_13.0.0_amd64.deb
277277
```
278278

279279
If you run Debian Buster (currently Debian stable) or Debian sid, ripgrep is

crates/core/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ pub fn args() -> Vec<OsString> {
2828
let (args, errs) = match parse(&config_path) {
2929
Ok((args, errs)) => (args, errs),
3030
Err(err) => {
31-
message!("{}", err);
31+
message!(
32+
"failed to read the file specified in RIPGREP_CONFIG_PATH: {}",
33+
err
34+
);
3235
return vec![];
3336
}
3437
};

crates/ignore/src/default_types.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
2121
("ats", &["*.ats", "*.dats", "*.sats", "*.hats"]),
2222
("avro", &["*.avdl", "*.avpr", "*.avsc"]),
2323
("awk", &["*.awk"]),
24-
("bazel", &["*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "WORKSPACE"]),
24+
("bazel", &[
25+
"*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "WORKSPACE",
26+
]),
2527
("bitbake", &["*.bb", "*.bbappend", "*.bbclass", "*.conf", "*.inc"]),
2628
("brotli", &["*.br"]),
2729
("buildstream", &["*.bst"]),
@@ -61,6 +63,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
6163
("elm", &["*.elm"]),
6264
("erb", &["*.erb"]),
6365
("erlang", &["*.erl", "*.hrl"]),
66+
("fennel", &["*.fnl"]),
6467
("fidl", &["*.fidl"]),
6568
("fish", &["*.fish"]),
6669
("flatbuffers", &["*.fbs"]),
@@ -69,7 +72,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
6972
"*.f90", "*.F90", "*.f95", "*.F95",
7073
]),
7174
("fsharp", &["*.fs", "*.fsx", "*.fsi"]),
72-
("fut", &[".fut"]),
75+
("fut", &["*.fut"]),
7376
("gap", &["*.g", "*.gap", "*.gi", "*.gd", "*.tst"]),
7477
("gn", &["*.gn", "*.gni"]),
7578
("go", &["*.go"]),
@@ -82,7 +85,9 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
8285
("hbs", &["*.hbs"]),
8386
("hs", &["*.hs", "*.lhs"]),
8487
("html", &["*.htm", "*.html", "*.ejs"]),
88+
("hy", &["*.hy"]),
8589
("idris", &["*.idr", "*.lidr"]),
90+
("janet", &["*.janet"]),
8691
("java", &["*.java", "*.jsp", "*.jspx", "*.properties"]),
8792
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
8893
("jl", &["*.jl"]),
@@ -121,6 +126,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
121126
"MPL-*[0-9]*",
122127
"OFL-*[0-9]*",
123128
]),
129+
("lilypond", &["*.ly", "*.ily"]),
124130
("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
125131
("lock", &["*.lock", "package-lock.json"]),
126132
("log", &["*.log"]),
@@ -240,8 +246,12 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
240246
("vcl", &["*.vcl"]),
241247
("verilog", &["*.v", "*.vh", "*.sv", "*.svh"]),
242248
("vhdl", &["*.vhd", "*.vhdl"]),
243-
("vim", &["*.vim"]),
244-
("vimscript", &["*.vim"]),
249+
("vim", &[
250+
"*.vim", ".vimrc", ".gvimrc", "vimrc", "gvimrc", "_vimrc", "_gvimrc",
251+
]),
252+
("vimscript", &[
253+
"*.vim", ".vimrc", ".gvimrc", "vimrc", "gvimrc", "_vimrc", "_gvimrc",
254+
]),
245255
("webidl", &["*.idl", "*.webidl", "*.widl"]),
246256
("wiki", &["*.mediawiki", "*.wiki"]),
247257
("xml", &[

crates/ignore/src/dir.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,12 @@ impl Ignore {
211211
errs.maybe_push(err);
212212
igtmp.is_absolute_parent = true;
213213
igtmp.absolute_base = Some(absolute_base.clone());
214-
igtmp.has_git = if self.0.opts.git_ignore {
215-
parent.join(".git").exists()
216-
} else {
217-
false
218-
};
214+
igtmp.has_git =
215+
if self.0.opts.require_git && self.0.opts.git_ignore {
216+
parent.join(".git").exists()
217+
} else {
218+
false
219+
};
219220
ig = Ignore(Arc::new(igtmp));
220221
compiled.insert(parent.as_os_str().to_os_string(), ig.clone());
221222
}
@@ -240,7 +241,9 @@ impl Ignore {
240241

241242
/// Like add_child, but takes a full path and returns an IgnoreInner.
242243
fn add_child_path(&self, dir: &Path) -> (IgnoreInner, Option<Error>) {
243-
let git_type = if self.0.opts.git_ignore || self.0.opts.git_exclude {
244+
let git_type = if self.0.opts.require_git
245+
&& (self.0.opts.git_ignore || self.0.opts.git_exclude)
246+
{
244247
dir.join(".git").metadata().ok().map(|md| md.file_type())
245248
} else {
246249
None

0 commit comments

Comments
 (0)