Skip to content

Commit 6c40814

Browse files
Incorporate changes from latest ignore crate (#19148)
This updates our internal fork of the `ignore` crate to incorporate changes from the latest release [v0.4.24](BurntSushi/ripgrep@ignore-0.4.23...ignore-0.4.24). Aside: We should look into opening issues about the changes we had to make to see if they could be addressed in the crate itself so we can get rid of our fork.
1 parent a6a7e4c commit 6c40814

File tree

13 files changed

+429
-92
lines changed

13 files changed

+429
-92
lines changed

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ignore/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ignore"
3-
version = "0.4.23" #:version
3+
version = "0.4.24" #:version
44
authors = ["Andrew Gallant <[email protected]>"]
55
description = """
66
A fast library for efficiently matching ignore files such as `.gitignore`
@@ -12,15 +12,15 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/ignore"
1212
readme = "README.md"
1313
keywords = ["glob", "ignore", "gitignore", "pattern", "file"]
1414
license = "Unlicense OR MIT"
15-
edition = "2021"
15+
edition = "2024"
1616

1717
[lib]
1818
name = "ignore"
1919
bench = false
2020

2121
[dependencies]
2222
crossbeam-deque = "0.8.3"
23-
globset = "0.4.16"
23+
globset = "0.4.17"
2424
log = "0.4.20"
2525
memchr = "2.6.3"
2626
same-file = "1.0.6"
@@ -37,7 +37,7 @@ version = "0.1.2"
3737

3838
[dev-dependencies]
3939
bstr = { version = "1.6.2", default-features = false, features = ["std"] }
40-
crossbeam-channel = "0.5.8"
40+
crossbeam-channel = "0.5.15"
4141

4242
[features]
4343
# DEPRECATED. It is a no-op. SIMD is done automatically through runtime

crates/ignore/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# ignore
2-
1+
ignore
2+
======
33
The ignore crate provides a fast recursive directory iterator that respects
44
various filters such as globs, file types and `.gitignore` files. This crate
55
also provides lower level direct access to gitignore and file type matchers.
@@ -29,6 +29,7 @@ recursively traverse the current directory while automatically filtering out
2929
files and directories according to ignore globs found in files like
3030
`.ignore` and `.gitignore`:
3131

32+
3233
```rust,no_run
3334
use ignore::Walk;
3435

crates/ignore/examples/walk.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ fn main() {
1818
let stdout_thread = std::thread::spawn(move || {
1919
let mut stdout = std::io::BufWriter::new(std::io::stdout());
2020
for dent in rx {
21-
stdout.write(&*Vec::from_path_lossy(dent.path())).unwrap();
22-
stdout.write(b"\n").unwrap();
21+
stdout
22+
.write_all(&Vec::from_path_lossy(dent.path()))
23+
.unwrap();
24+
stdout.write_all(b"\n").unwrap();
2325
}
2426
});
2527

crates/ignore/src/default_types.rs

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
2727
(&["bat", "batch"], &["*.bat"]),
2828
(&["bazel"], &[
2929
"*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "MODULE.bazel",
30-
"WORKSPACE", "WORKSPACE.bazel",
30+
"WORKSPACE", "WORKSPACE.bazel", "WORKSPACE.bzlmod",
3131
]),
3232
(&["bitbake"], &["*.bb", "*.bbappend", "*.bbclass", "*.conf", "*.inc"]),
33+
(&["boxlang"], &["*.bx", "*.bxm", "*.bxs"]),
3334
(&["brotli"], &["*.br"]),
3435
(&["buildstream"], &["*.bst"]),
3536
(&["bzip2"], &["*.bz2", "*.tbz2"]),
@@ -39,6 +40,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
3940
(&["carp"], &["*.carp"]),
4041
(&["cbor"], &["*.cbor"]),
4142
(&["ceylon"], &["*.ceylon"]),
43+
(&["cfml"], &["*.cfc", "*.cfm"]),
4244
(&["clojure"], &["*.clj", "*.cljc", "*.cljs", "*.cljx"]),
4345
(&["cmake"], &["*.cmake", "CMakeLists.txt"]),
4446
(&["cmd"], &["*.bat", "*.cmd"]),
@@ -62,7 +64,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
6264
(&["cython"], &["*.pyx", "*.pxi", "*.pxd"]),
6365
(&["d"], &["*.d"]),
6466
(&["dart"], &["*.dart"]),
65-
(&["devicetree"], &["*.dts", "*.dtsi"]),
67+
(&["devicetree"], &["*.dts", "*.dtsi", "*.dtso"]),
6668
(&["dhall"], &["*.dhall"]),
6769
(&["diff"], &["*.patch", "*.diff"]),
6870
(&["dita"], &["*.dita", "*.ditamap", "*.ditaval"]),
@@ -88,6 +90,8 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
8890
(&["fsharp"], &["*.fs", "*.fsx", "*.fsi"]),
8991
(&["fut"], &["*.fut"]),
9092
(&["gap"], &["*.g", "*.gap", "*.gi", "*.gd", "*.tst"]),
93+
(&["gdscript"], &["*.gd"]),
94+
(&["gleam"], &["*.gleam"]),
9195
(&["gn"], &["*.gn", "*.gni"]),
9296
(&["go"], &["*.go"]),
9397
(&["gprbuild"], &["*.gpr"]),
@@ -117,6 +121,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
117121
(&["julia"], &["*.jl"]),
118122
(&["jupyter"], &["*.ipynb", "*.jpynb"]),
119123
(&["k"], &["*.k"]),
124+
(&["kconfig"], &["Kconfig", "Kconfig.*"]),
120125
(&["kotlin"], &["*.kt", "*.kts"]),
121126
(&["lean"], &["*.lean"]),
122127
(&["less"], &["*.less"]),
@@ -149,6 +154,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
149154
]),
150155
(&["lilypond"], &["*.ly", "*.ily"]),
151156
(&["lisp"], &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
157+
(&["llvm"], &["*.ll"]),
152158
(&["lock"], &["*.lock", "package-lock.json"]),
153159
(&["log"], &["*.log"]),
154160
(&["lua"], &["*.lua"]),
@@ -159,6 +165,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
159165
"[Gg][Nn][Uu]makefile", "[Mm]akefile",
160166
"[Gg][Nn][Uu]makefile.am", "[Mm]akefile.am",
161167
"[Gg][Nn][Uu]makefile.in", "[Mm]akefile.in",
168+
"Makefile.*",
162169
"*.mk", "*.mak"
163170
]),
164171
(&["mako"], &["*.mako", "*.mao"]),
@@ -181,7 +188,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
181188
(&["motoko"], &["*.mo"]),
182189
(&["msbuild"], &[
183190
"*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets",
184-
"*.sln",
191+
"*.sln", "*.slnf"
185192
]),
186193
(&["nim"], &["*.nim", "*.nimf", "*.nimble", "*.nims"]),
187194
(&["nix"], &["*.nix"]),
@@ -210,7 +217,9 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
210217
(&["py", "python"], &["*.py", "*.pyi"]),
211218
(&["qmake"], &["*.pro", "*.pri", "*.prf"]),
212219
(&["qml"], &["*.qml"]),
213-
(&["r"], &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
220+
(&["qrc"], &["*.qrc"]),
221+
(&["qui"], &["*.ui"]),
222+
(&["r"], &["*.R", "*.r", "*.Rmd", "*.rmd", "*.Rnw", "*.rnw"]),
214223
(&["racket"], &["*.rkt"]),
215224
(&["raku"], &[
216225
"*.raku", "*.rakumod", "*.rakudoc", "*.rakutest",
@@ -227,14 +236,16 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
227236
// Idiomatic files
228237
"config.ru", "Gemfile", ".irbrc", "Rakefile",
229238
// Extensions
230-
"*.gemspec", "*.rb", "*.rbw"
239+
"*.gemspec", "*.rb", "*.rbw", "*.rake"
231240
]),
232241
(&["rust"], &["*.rs"]),
233242
(&["sass"], &["*.sass", "*.scss"]),
234243
(&["scala"], &["*.scala", "*.sbt"]),
244+
(&["scdoc"], &["*.scd", "*.scdoc"]),
245+
(&["seed7"], &["*.sd7", "*.s7i"]),
235246
(&["sh"], &[
236247
// Portable/misc. init files
237-
".login", ".logout", ".profile", "profile",
248+
".env", ".login", ".logout", ".profile", "profile",
238249
// bash-specific init files
239250
".bash_login", "bash_login",
240251
".bash_logout", "bash_logout",
@@ -253,7 +264,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
253264
".zprofile", "zprofile",
254265
".zshrc", "zshrc",
255266
// Extensions
256-
"*.bash", "*.csh", "*.ksh", "*.sh", "*.tcsh", "*.zsh",
267+
"*.bash", "*.csh", "*.env", "*.ksh", "*.sh", "*.tcsh", "*.zsh",
257268
]),
258269
(&["slim"], &["*.skim", "*.slim", "*.slime"]),
259270
(&["smarty"], &["*.tpl"]),
@@ -265,7 +276,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
265276
(&["sql"], &["*.sql", "*.psql"]),
266277
(&["stylus"], &["*.styl"]),
267278
(&["sv"], &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]),
268-
(&["svelte"], &["*.svelte"]),
279+
(&["svelte"], &["*.svelte", "*.svelte.ts"]),
269280
(&["svg"], &["*.svg"]),
270281
(&["swift"], &["*.swift"]),
271282
(&["swig"], &["*.def", "*.i"]),
@@ -280,16 +291,16 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
280291
(&["texinfo"], &["*.texi"]),
281292
(&["textile"], &["*.textile"]),
282293
(&["tf"], &[
283-
"*.tf", "*.auto.tfvars", "terraform.tfvars", "*.tf.json",
284-
"*.auto.tfvars.json", "terraform.tfvars.json", "*.terraformrc",
285-
"terraform.rc", "*.tfrc", "*.terraform.lock.hcl",
294+
"*.tf", "*.tf.json", "*.tfvars", "*.tfvars.json",
295+
"*.terraformrc", "terraform.rc", "*.tfrc", "*.terraform.lock.hcl",
286296
]),
287297
(&["thrift"], &["*.thrift"]),
288298
(&["toml"], &["*.toml", "Cargo.lock"]),
289299
(&["ts", "typescript"], &["*.ts", "*.tsx", "*.cts", "*.mts"]),
290300
(&["twig"], &["*.twig"]),
291301
(&["txt"], &["*.txt"]),
292302
(&["typoscript"], &["*.typoscript", "*.ts"]),
303+
(&["typst"], &["*.typ"]),
293304
(&["usd"], &["*.usd", "*.usda", "*.usdc"]),
294305
(&["v"], &["*.v", "*.vsh"]),
295306
(&["vala"], &["*.vala"]),

0 commit comments

Comments
 (0)