From 8773402246f508dc8022f877a9c5c712f250c38c Mon Sep 17 00:00:00 2001 From: Maksim Bondarenkov <119937608+ognevny@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:44:38 +0300 Subject: [PATCH 01/26] Makefile: use `--locked` for build to be ensured that Cargo.lock is up to date. also it's needed for disributions --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6ca17ba..b351271 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ datadir=$(prefix)/share exe_name=fd $(EXE): Cargo.toml src/**/*.rs - cargo build --profile $(PROFILE) + cargo build --profile $(PROFILE) --locked .PHONY: completions completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/fd.ps1 autocomplete/_fd From 72ff1f9a873080cb6feb8d39b791f380d9145878 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:54:48 +0000 Subject: [PATCH 02/26] build(deps): bump regex from 1.10.2 to 1.10.3 Bumps [regex](https://github.com/rust-lang/regex) from 1.10.2 to 1.10.3. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04da57f..230adde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -613,9 +613,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -625,9 +625,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 36dabf5..9111f85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ aho-corasick = "1.0" nu-ansi-term = "0.49" argmax = "0.3.1" ignore = "0.4.21" -regex = "1.9.6" +regex = "1.10.3" regex-syntax = "0.8" ctrlc = "3.2" humantime = "2.1" From 17895538a0f8f4dbed923e1d00fb7e79ede0ee67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:54:58 +0000 Subject: [PATCH 03/26] build(deps): bump crossbeam-channel from 0.5.10 to 0.5.11 Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.10 to 0.5.11. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.10...crossbeam-channel-0.5.11) --- updated-dependencies: - dependency-name: crossbeam-channel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 ++--- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04da57f..03b81c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -216,11 +216,10 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "crossbeam-channel" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if", "crossbeam-utils", ] diff --git a/Cargo.toml b/Cargo.toml index 36dabf5..0d91ab8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ globset = "0.4" anyhow = "1.0" etcetera = "0.8" normpath = "1.1.1" -crossbeam-channel = "0.5.10" +crossbeam-channel = "0.5.11" clap_complete = {version = "4.4.6", optional = true} faccess = "0.2.4" From b55bb1e9beca38a85fb96df67947e6dce26f4080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 18:33:20 +0000 Subject: [PATCH 04/26] build(deps): bump clap_complete from 4.4.6 to 4.4.9 Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.4.6 to 4.4.9. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.4.6...clap_complete-v4.4.9) --- updated-dependencies: - dependency-name: clap_complete dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c85fb9..89d734b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.6" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97aeaa95557bd02f23fbb662f981670c3d20c5a26e69f7354b28f57092437fcd" +checksum = "df631ae429f6613fcd3a7c1adbdb65f637271e561b03680adaa6573015dfb106" dependencies = [ "clap", ] diff --git a/Cargo.toml b/Cargo.toml index 5ecb995..e611177 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ anyhow = "1.0" etcetera = "0.8" normpath = "1.1.1" crossbeam-channel = "0.5.11" -clap_complete = {version = "4.4.6", optional = true} +clap_complete = {version = "4.4.9", optional = true} faccess = "0.2.4" [dependencies.clap] From 077d28d13a74addf247afab3f3ed630b59363675 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 18:34:09 +0000 Subject: [PATCH 05/26] build(deps): bump ignore from 0.4.21 to 0.4.22 Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.21 to 0.4.22. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.21...ignore-0.4.22) --- updated-dependencies: - dependency-name: ignore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c85fb9..50d5e51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -413,9 +413,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" dependencies = [ "crossbeam-deque", "globset", diff --git a/Cargo.toml b/Cargo.toml index 5ecb995..7dfc5a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ version_check = "0.9" aho-corasick = "1.0" nu-ansi-term = "0.49" argmax = "0.3.1" -ignore = "0.4.21" +ignore = "0.4.22" regex = "1.10.3" regex-syntax = "0.8" ctrlc = "3.2" From a4aed1433701ee6f42b82dc4364b3354271c7b5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:50:41 +0000 Subject: [PATCH 06/26] build(deps): bump nu-ansi-term from 0.49.0 to 0.50.0 Bumps [nu-ansi-term](https://github.com/nushell/nu-ansi-term) from 0.49.0 to 0.50.0. - [Release notes](https://github.com/nushell/nu-ansi-term/releases) - [Changelog](https://github.com/nushell/nu-ansi-term/blob/main/CHANGELOG.md) - [Commits](https://github.com/nushell/nu-ansi-term/compare/v0.49.0...v0.50.0) --- updated-dependencies: - dependency-name: nu-ansi-term dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 +++++++++++-- Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0b3340..f983af6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -334,7 +334,7 @@ dependencies = [ "lscolors", "nix 0.27.1", "normpath", - "nu-ansi-term", + "nu-ansi-term 0.50.0", "regex", "regex-syntax", "tempfile", @@ -486,7 +486,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab0b209ec3976527806024406fe765474b9a1750a0ed4b8f0372364741f50e7b" dependencies = [ - "nu-ansi-term", + "nu-ansi-term 0.49.0", ] [[package]] @@ -544,6 +544,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "nu-ansi-term" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2800e1520bdc966782168a627aa5d1ad92e33b984bf7c7615d31280c83ff14" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "num-traits" version = "0.2.17" diff --git a/Cargo.toml b/Cargo.toml index 618adf4..711bf63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ version_check = "0.9" [dependencies] aho-corasick = "1.0" -nu-ansi-term = "0.49" +nu-ansi-term = "0.50" argmax = "0.3.1" ignore = "0.4.22" regex = "1.10.3" From 5b46867507b5cce8be1f80c8ca8a4d2b7d71fd91 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 7 Feb 2024 09:29:43 +0100 Subject: [PATCH 07/26] Add Terminal Trove sponsorship --- README.md | 20 ++++++++++++++++---- doc/sponsors.md | 14 ++++++++++++++ doc/sponsors/terminal_trove_green.svg | 5 +++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 doc/sponsors.md create mode 100644 doc/sponsors/terminal_trove_green.svg diff --git a/README.md b/README.md index 18cbdb0..52b94b1 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,22 @@ It is a simple, fast and user-friendly alternative to [`find`](https://www.gnu.o While it does not aim to support all of `find`'s powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases. -Quick links: -* [How to use](#how-to-use) -* [Installation](#installation) -* [Troubleshooting](#troubleshooting) +[Installation](#installation) • [How to use](#how-to-use) • [Troubleshooting](#troubleshooting) + +## Sponsors + +A special *thank you* goes to our biggest sponsors:
+ + Terminal Trove +
+ The $HOME of all things in the terminal. +
+
+ + Find your next CLI / TUI tool and more at Terminal Trove, +
+ Get updates on new tools on our newsletter. +
## Features diff --git a/doc/sponsors.md b/doc/sponsors.md new file mode 100644 index 0000000..ac4366d --- /dev/null +++ b/doc/sponsors.md @@ -0,0 +1,14 @@ +## Sponsors + +`fd` development is sponsored by many individuals and companies. Thank you very much! + +Please note, that being sponsored does not affect the individuality of the `fd` +project or affect the maintainers' actions in any way. +We remain impartial and continue to assess pull requests solely on merit - the +features added, bugs solved, and effect on the overall complexity of the code. +No issue will have a different priority based on sponsorship status of the +reporter. + +Contributions from anybody are most welcomed, please see our [`CONTRIBUTING.md`](../CONTRIBUTING.md) guide. + +If you want to see our biggest sponsors, check the top of [`README.md`](../README.md#sponsors). diff --git a/doc/sponsors/terminal_trove_green.svg b/doc/sponsors/terminal_trove_green.svg new file mode 100644 index 0000000..772d7a2 --- /dev/null +++ b/doc/sponsors/terminal_trove_green.svg @@ -0,0 +1,5 @@ + + + + + From 969316cc0e87171273c6ea78ca73b6ee9ac3cb20 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 7 Feb 2024 09:32:16 +0100 Subject: [PATCH 08/26] More whitespace --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52b94b1..5a83dd4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ While it does not aim to support all of `find`'s powerful functionality, it prov ## Sponsors -A special *thank you* goes to our biggest sponsors:
+A special *thank you* goes to our biggest sponsors: + Terminal Trove
From b0a8848f680ed9df2bd742b05997acb695df0b44 Mon Sep 17 00:00:00 2001 From: Nathan Bellows Date: Mon, 12 Feb 2024 02:05:41 -0800 Subject: [PATCH 09/26] Add support for @%s time format --- CHANGELOG.md | 1 + doc/fd.1 | 12 ++++++++---- src/filter/time.rs | 30 +++++++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f447f..1717b85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Features - Add `dir` as an alias to `directory` when using `-t` \ `--type`, see #1460 and #1464 (@Ato2207). +- Add support for @%s date format in time filters similar to GNU date (seconds since Unix epoch for --older/--newer), see #1493 (@nabellows) ## Bugfixes diff --git a/doc/fd.1 b/doc/fd.1 index 8877317..1ac63c5 100644 --- a/doc/fd.1 +++ b/doc/fd.1 @@ -312,8 +312,9 @@ tebibytes Filter results based on the file modification time. Files with modification times greater than the argument will be returned. The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point -in time in either full RFC3339 format with time zone, or as a date or datetime in the -local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR). +in time as full RFC3339 format with time zone, as a date or datetime in the +local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR), or as the prefix '@' +followed by the number of seconds since the Unix epoch (@[0-9]+). \fB\-\-change-newer-than\fR, .B --newer or @@ -324,13 +325,15 @@ Examples: \-\-changed-within 2weeks \-\-change-newer-than "2018-10-27 10:00:00" \-\-newer 2018-10-27 + \-\-changed-after @1704067200 .TP .BI "\-\-changed-before " date|duration Filter results based on the file modification time. Files with modification times less than the argument will be returned. The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point -in time in either full RFC3339 format with time zone, or as a date or datetime in the -local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR). +in time as full RFC3339 format with time zone, as a date or datetime in the +local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR), or as the prefix '@' +followed by the number of seconds since the Unix epoch (@[0-9]+). .B --change-older-than or .B --older @@ -339,6 +342,7 @@ can be used as aliases. Examples: \-\-changed-before "2018-10-27 10:00:00" \-\-change-older-than 2weeks + \-\-older @1704067200 .TP .BI "-o, \-\-owner " [user][:group] Filter files by their user and/or group. Format: [(user|uid)][:(group|gid)]. Either side diff --git a/src/filter/time.rs b/src/filter/time.rs index 0070e5e..9631f13 100644 --- a/src/filter/time.rs +++ b/src/filter/time.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, Local, NaiveDate, NaiveDateTime}; +use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, Utc}; use std::time::SystemTime; @@ -31,6 +31,13 @@ impl TimeFilter { .and_local_timezone(Local) .latest() }) + .or_else(|| { + let timestamp_secs = s.strip_prefix('@')?.parse().ok()?; + NaiveDateTime::from_timestamp_opt(timestamp_secs, 0)? + .and_local_timezone(Utc) + .latest() + .map(Into::into) + }) .map(|dt| dt.into()) }) } @@ -135,5 +142,26 @@ mod tests { assert!(!TimeFilter::after(&ref_time, t10s_before) .unwrap() .applies_to(&t1m_ago)); + + let ref_timestamp = 1707723412u64; // Mon Feb 12 07:36:52 UTC 2024 + let ref_time = DateTime::parse_from_rfc3339("2024-02-12T07:36:52+00:00") + .unwrap() + .into(); + let t1m_ago = ref_time - Duration::from_secs(60); + let t1s_later = ref_time + Duration::from_secs(1); + // Timestamp only supported via '@' prefix + assert!(TimeFilter::before(&ref_time, &ref_timestamp.to_string()).is_none()); + assert!(TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1m_ago)); + assert!(!TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1s_later)); + assert!(!TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1m_ago)); + assert!(TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1s_later)); } } From ffde94c10e3ba757693cc43c75becbf8127e9c80 Mon Sep 17 00:00:00 2001 From: Nathan Bellows Date: Mon, 12 Feb 2024 02:12:58 -0800 Subject: [PATCH 10/26] Run formatting --- src/filter/time.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/filter/time.rs b/src/filter/time.rs index 9631f13..4777f0f 100644 --- a/src/filter/time.rs +++ b/src/filter/time.rs @@ -151,15 +151,21 @@ mod tests { let t1s_later = ref_time + Duration::from_secs(1); // Timestamp only supported via '@' prefix assert!(TimeFilter::before(&ref_time, &ref_timestamp.to_string()).is_none()); - assert!(TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) - .unwrap() - .applies_to(&t1m_ago)); - assert!(!TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) - .unwrap() - .applies_to(&t1s_later)); - assert!(!TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) - .unwrap() - .applies_to(&t1m_ago)); + assert!( + TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1m_ago) + ); + assert!( + !TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1s_later) + ); + assert!( + !TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) + .unwrap() + .applies_to(&t1m_ago) + ); assert!(TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp)) .unwrap() .applies_to(&t1s_later)); From f699c8bb6ada21520dad1413ea7a360c3e280ab9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:41:45 +0000 Subject: [PATCH 11/26] build(deps): bump libc from 0.2.151 to 0.2.153 Bumps [libc](https://github.com/rust-lang/libc) from 0.2.151 to 0.2.153. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.151...0.2.153) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f983af6..a349690 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -464,9 +464,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" From 6ae8da6a3964ce96c793c4bf9e63417705881d42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:41:57 +0000 Subject: [PATCH 12/26] build(deps): bump tempfile from 3.9.0 to 3.10.1 Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.9.0 to 3.10.1. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.9.0...v3.10.1) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 ++++++------- Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f983af6..bf80e88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -464,9 +464,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" @@ -650,9 +650,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.4.1", "errno", @@ -725,13 +725,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] diff --git a/Cargo.toml b/Cargo.toml index 711bf63..88f540c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ jemallocator = {version = "0.5.4", optional = true} [dev-dependencies] diff = "0.1" -tempfile = "3.9" +tempfile = "3.10" filetime = "0.2" test-case = "3.3" From 7f74cd9e561601cae9462524728fa1d5c37a9528 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:42:05 +0000 Subject: [PATCH 13/26] build(deps): bump chrono from 0.4.31 to 0.4.34 Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.31 to 0.4.34. - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.31...v0.4.34) --- updated-dependencies: - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f983af6..56c9093 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,14 +142,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 711bf63..d30fdcd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ version = "4.4.13" features = ["suggestions", "color", "wrap_help", "cargo", "derive"] [dependencies.chrono] -version = "0.4.31" +version = "0.4.34" default-features = false features = ["std", "clock"] From 0788c43c3fcd61f0d3a3807d250563739d6ed371 Mon Sep 17 00:00:00 2001 From: garlic-hub <12842269+garlic-hub@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:46:24 -0800 Subject: [PATCH 14/26] Clean up clippy warnings --- src/dir_entry.rs | 2 +- src/exec/token.rs | 2 +- src/regex_helper.rs | 2 +- src/walk.rs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dir_entry.rs b/src/dir_entry.rs index f44f2be..64d7adf 100644 --- a/src/dir_entry.rs +++ b/src/dir_entry.rs @@ -113,7 +113,7 @@ impl Eq for DirEntry {} impl PartialOrd for DirEntry { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.path().partial_cmp(other.path()) + Some(self.cmp(other)) } } diff --git a/src/exec/token.rs b/src/exec/token.rs index 2dc37ce..b96c3a3 100644 --- a/src/exec/token.rs +++ b/src/exec/token.rs @@ -41,7 +41,7 @@ pub(super) fn tokenize(input: &str) -> ArgumentTemplate { let mut remaining = input; let mut buf = String::new(); let placeholders = PLACEHOLDERS.get_or_init(|| { - AhoCorasick::new(&["{{", "}}", "{}", "{/}", "{//}", "{.}", "{/.}"]).unwrap() + AhoCorasick::new(["{{", "}}", "{}", "{/}", "{//}", "{.}", "{/.}"]).unwrap() }); while let Some(m) = placeholders.find(remaining) { match m.pattern().as_u32() { diff --git a/src/regex_helper.rs b/src/regex_helper.rs index 98211fe..39878f5 100644 --- a/src/regex_helper.rs +++ b/src/regex_helper.rs @@ -16,7 +16,7 @@ fn hir_has_uppercase_char(hir: &Hir) -> bool { use regex_syntax::hir::*; match hir.kind() { - HirKind::Literal(Literal(bytes)) => match std::str::from_utf8(&bytes) { + HirKind::Literal(Literal(bytes)) => match std::str::from_utf8(bytes) { Ok(s) => s.chars().any(|c| c.is_uppercase()), Err(_) => bytes.iter().any(|b| char::from(*b).is_uppercase()), }, diff --git a/src/walk.rs b/src/walk.rs index c81d2a4..6f83365 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -250,7 +250,7 @@ impl<'a, W: Write> ReceiverBuffer<'a, W> { /// Output a path. fn print(&mut self, entry: &DirEntry) -> Result<(), ExitCode> { - output::print_entry(&mut self.stdout, entry, &self.config); + output::print_entry(&mut self.stdout, entry, self.config); if self.interrupt_flag.load(Ordering::Relaxed) { // Ignore any errors on flush, because we're about to exit anyway @@ -413,7 +413,7 @@ impl WorkerState { // This will be set to `Some` if the `--exec` argument was supplied. if let Some(ref cmd) = config.command { if cmd.in_batch_mode() { - exec::batch(rx.into_iter().flatten(), cmd, &config) + exec::batch(rx.into_iter().flatten(), cmd, config) } else { let out_perm = Mutex::new(()); @@ -426,7 +426,7 @@ impl WorkerState { // Spawn a job thread that will listen for and execute inputs. let handle = scope - .spawn(|| exec::job(rx.into_iter().flatten(), cmd, &out_perm, &config)); + .spawn(|| exec::job(rx.into_iter().flatten(), cmd, &out_perm, config)); // Push the handle of the spawned thread into the vector for later joining. handles.push(handle); From b08d78f6fc02b309861890bfc9b7d0138697ae75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:45:08 +0000 Subject: [PATCH 15/26] build(deps): bump softprops/action-gh-release from 1 to 2 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index f070365..92a777e 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -331,7 +331,7 @@ jobs: echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT - name: Publish archives and packages - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: steps.is-release.outputs.IS_RELEASE with: files: | From 138919907b40de0904727b289058ab18d224d795 Mon Sep 17 00:00:00 2001 From: one230six <723682061@qq.com> Date: Wed, 13 Mar 2024 15:37:24 +0800 Subject: [PATCH 16/26] refactor: Optimize code based on cargo clippy suggestions Signed-off-by: one230six <723682061@qq.com> --- src/walk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/walk.rs b/src/walk.rs index 6f83365..08ff3fe 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -12,7 +12,7 @@ use anyhow::{anyhow, Result}; use crossbeam_channel::{bounded, Receiver, RecvTimeoutError, SendError, Sender}; use etcetera::BaseStrategy; use ignore::overrides::{Override, OverrideBuilder}; -use ignore::{self, WalkBuilder, WalkParallel, WalkState}; +use ignore::{WalkBuilder, WalkParallel, WalkState}; use regex::bytes::Regex; use crate::config::Config; From f875ea9a52e7cbdbcfd150fe12624e0746894399 Mon Sep 17 00:00:00 2001 From: Jian Wang Date: Mon, 4 Mar 2024 20:59:06 +0100 Subject: [PATCH 17/26] Set default path separator to '/' in MSYS/MSYS2 The environments of MSYS: [[https://www.msys2.org/docs/environments/]] --- src/filesystem.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/filesystem.rs b/src/filesystem.rs index b9df0ba..83e55c9 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -128,13 +128,11 @@ pub fn strip_current_dir(path: &Path) -> &Path { pub fn default_path_separator() -> Option { if cfg!(windows) { let msystem = env::var("MSYSTEM").ok()?; - match msystem.as_str() { - "MINGW64" | "MINGW32" | "MSYS" => Some("/".to_owned()), - _ => None, + if !msystem.as_str().is_empty() { + return Some("/".to_owned()); } - } else { - None } + None } #[cfg(test)] From 5910285db098240ea690386c6f9f68d8a8d05f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:31:00 +0000 Subject: [PATCH 18/26] build(deps): bump aho-corasick from 1.1.2 to 1.1.3 Bumps [aho-corasick](https://github.com/BurntSushi/aho-corasick) from 1.1.2 to 1.1.3. - [Commits](https://github.com/BurntSushi/aho-corasick/compare/1.1.2...1.1.3) --- updated-dependencies: - dependency-name: aho-corasick dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcd5e57..e489146 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index c1cf5e5..7a6205f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ path = "src/main.rs" version_check = "0.9" [dependencies] -aho-corasick = "1.0" +aho-corasick = "1.1" nu-ansi-term = "0.50" argmax = "0.3.1" ignore = "0.4.22" From 39c07b7b4c92e4936aa98d9e4239354399f8ee3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:31:06 +0000 Subject: [PATCH 19/26] build(deps): bump lscolors from 0.16.0 to 0.17.0 Bumps [lscolors](https://github.com/sharkdp/lscolors) from 0.16.0 to 0.17.0. - [Release notes](https://github.com/sharkdp/lscolors/releases) - [Commits](https://github.com/sharkdp/lscolors/compare/0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: lscolors dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 17 ++++------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcd5e57..afba83f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -334,7 +334,7 @@ dependencies = [ "lscolors", "nix 0.27.1", "normpath", - "nu-ansi-term 0.50.0", + "nu-ansi-term", "regex", "regex-syntax", "tempfile", @@ -482,11 +482,11 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lscolors" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0b209ec3976527806024406fe765474b9a1750a0ed4b8f0372364741f50e7b" +checksum = "53304fff6ab1e597661eee37e42ea8c47a146fca280af902bb76bff8a896e523" dependencies = [ - "nu-ansi-term 0.49.0", + "nu-ansi-term", ] [[package]] @@ -535,15 +535,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "nu-ansi-term" -version = "0.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "nu-ansi-term" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index c1cf5e5..6fabee8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,7 @@ default-features = false features = ["std", "clock"] [dependencies.lscolors] -version = "0.16" +version = "0.17" default-features = false features = ["nu-ansi-term"] From 453577651e25fb2255a53bfbb3fccfea4a43c575 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:31:12 +0000 Subject: [PATCH 20/26] build(deps): bump crossbeam-channel from 0.5.11 to 0.5.12 Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.11 to 0.5.12. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.11...crossbeam-channel-0.5.12) --- updated-dependencies: - dependency-name: crossbeam-channel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcd5e57..e705957 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -216,9 +216,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ "crossbeam-utils", ] diff --git a/Cargo.toml b/Cargo.toml index c1cf5e5..c795ee2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ globset = "0.4" anyhow = "1.0" etcetera = "0.8" normpath = "1.1.1" -crossbeam-channel = "0.5.11" +crossbeam-channel = "0.5.12" clap_complete = {version = "4.4.9", optional = true} faccess = "0.2.4" From e262ade74eabe813dbe849db39f61a831658a14f Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Thu, 11 Apr 2024 21:14:11 -0600 Subject: [PATCH 21/26] Update MSRV to 1.77.2 Prior to this version, `Command` didn't properly escape command line arguments on windows. Although, the risk of attacker controlled arguments passed through fd is relatively small, I think it is best to upgrade to a version that fixes this. The biggest risk for users is probably running fd with `--exec` or `--exec-batch` on directories that contain files with names controlled by another party (for example a git repo that you cloned). See: https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html Security: CVE-2024-24576 --- Cargo.lock | 372 +++++++++++++++++++++++------------------------------ Cargo.toml | 2 +- README.md | 2 +- 3 files changed, 166 insertions(+), 210 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d06331b..9ac5eba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -42,43 +42,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "argmax" @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "bitflags" @@ -105,15 +105,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bstr" -version = "1.7.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "serde", @@ -121,18 +121,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" [[package]] name = "cfg-if" @@ -141,22 +138,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.34" +name = "cfg_aliases" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chrono" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] name = "clap" -version = "4.4.13" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -164,9 +167,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -177,30 +180,30 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.9" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df631ae429f6613fcd3a7c1adbdb65f637271e561b03680adaa6573015dfb106" +checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -210,9 +213,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "crossbeam-channel" @@ -225,45 +228,37 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "ctrlc" -version = "3.4.1" +version = "3.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf" +checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" dependencies = [ - "nix 0.27.1", - "windows-sys 0.48.0", + "nix 0.28.0", + "windows-sys 0.52.0", ] [[package]] @@ -306,9 +301,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fd-find" @@ -369,17 +364,17 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -390,9 +385,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -449,9 +444,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -470,15 +465,15 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lscolors" @@ -491,18 +486,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "nix" @@ -521,18 +507,30 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "cfg-if", "libc", ] [[package]] -name = "normpath" -version = "1.1.1" +name = "nix" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "windows-sys 0.48.0", + "bitflags 2.5.0", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "normpath" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5831952a9476f2fed74b77d74182fa5ddc4d21c72ec45a333b250e3ed0272804" +dependencies = [ + "windows-sys 0.52.0", ] [[package]] @@ -546,57 +544,33 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -612,9 +586,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -624,9 +598,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -635,17 +609,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -661,53 +635,37 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" -version = "1.0.189" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -747,27 +705,25 @@ dependencies = [ [[package]] name = "test-case-core" -version = "3.2.1" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c25e2cb8f5fcd7318157634e8838aa6f7e4715c96637f969fabaccd1ef5462" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ "cfg-if", - "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn", ] [[package]] name = "test-case-macros" -version = "3.2.1" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37cfd7bbc88a0104e304229fba519bdc45501a30b760fb72240342f1289ad257" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn", "test-case-core", ] @@ -791,9 +747,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -801,9 +757,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -811,24 +767,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -836,22 +792,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "winapi" @@ -886,11 +842,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.4", ] [[package]] @@ -908,7 +864,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -928,17 +884,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -949,9 +905,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -961,9 +917,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -973,9 +929,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -985,9 +941,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -997,9 +953,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -1009,9 +965,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -1021,6 +977,6 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" diff --git a/Cargo.toml b/Cargo.toml index 34d33be..19e9e69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ readme = "README.md" repository = "https://github.com/sharkdp/fd" version = "9.0.0" edition= "2021" -rust-version = "1.70.0" +rust-version = "1.77.2" [badges.appveyor] repository = "sharkdp/fd" diff --git a/README.md b/README.md index 5a83dd4..c52cf40 100644 --- a/README.md +++ b/README.md @@ -677,7 +677,7 @@ With Rust's package manager [cargo](https://github.com/rust-lang/cargo), you can ``` cargo install fd-find ``` -Note that rust version *1.70.0* or later is required. +Note that rust version *1.77.2* or later is required. `make` is also needed for the build. From 7794c4aae5abdd215d8879136e4f536fd086ff17 Mon Sep 17 00:00:00 2001 From: binlingyu Date: Mon, 15 Apr 2024 10:36:10 +0800 Subject: [PATCH 22/26] Use 'MAIN_SEPARATOR_STR' instead of '&MAIN_SEPARATOR.to_string()' --- src/exec/input.rs | 4 ++-- tests/testenv/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exec/input.rs b/src/exec/input.rs index af7ba25..a599432 100644 --- a/src/exec/input.rs +++ b/src/exec/input.rs @@ -34,10 +34,10 @@ pub fn dirname(path: &Path) -> OsString { #[cfg(test)] mod path_tests { use super::*; - use std::path::MAIN_SEPARATOR; + use std::path::MAIN_SEPARATOR_STR; fn correct(input: &str) -> String { - input.replace('/', &MAIN_SEPARATOR.to_string()) + input.replace('/', MAIN_SEPARATOR_STR) } macro_rules! func_tests { diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs index 188559d..c39fa69 100644 --- a/tests/testenv/mod.rs +++ b/tests/testenv/mod.rs @@ -129,7 +129,7 @@ fn normalize_output(s: &str, trim_start: bool, normalize_line: bool) -> String { .lines() .map(|line| { let line = if trim_start { line.trim_start() } else { line }; - let line = line.replace('/', &std::path::MAIN_SEPARATOR.to_string()); + let line = line.replace('/', std::path::MAIN_SEPARATOR_STR); if normalize_line { let mut words: Vec<_> = line.split_whitespace().collect(); words.sort_unstable(); From cf6ff87c7df1a568559ca031be14fda613a1bab5 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Wed, 13 Mar 2024 23:20:57 -0600 Subject: [PATCH 23/26] Add clippy using latest rust version to CI Fixes: #1511 --- .github/workflows/CICD.yml | 10 ++++++++++ tests/tests.rs | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 92a777e..c07c41c 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -44,6 +44,16 @@ jobs: - uses: actions/checkout@v4 - run: cargo fmt -- --check + lint_check: + name: Ensure 'cargo clippy' has no warnings + runs-on: ubuntu-latest + steps: + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: actions/checkout@v4 + - run: cargo clippy --all-targets --all-features -- -Dwarnings + min_version: name: Minimum supported rust version runs-on: ubuntu-20.04 diff --git a/tests/tests.rs b/tests/tests.rs index 1edbeae..ba83141 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1311,7 +1311,8 @@ fn test_type_executable() { let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES); fs::OpenOptions::new() - .create(true) + .create_new(true) + .truncate(true) .write(true) .mode(0o777) .open(te.test_root().join("executable-file.sh")) @@ -1319,6 +1320,7 @@ fn test_type_executable() { fs::OpenOptions::new() .create(true) + .truncate(true) .write(true) .mode(0o645) .open(te.test_root().join("not-user-executable-file.sh")) From 7e5d14b733a401934c7d8d6b340f809a794c5b43 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Sat, 27 Apr 2024 21:58:54 -0600 Subject: [PATCH 24/26] Fix deprecation warning. --- src/filter/time.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/filter/time.rs b/src/filter/time.rs index 4777f0f..a672594 100644 --- a/src/filter/time.rs +++ b/src/filter/time.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, Utc}; +use chrono::{DateTime, Local, NaiveDate, NaiveDateTime}; use std::time::SystemTime; @@ -33,10 +33,7 @@ impl TimeFilter { }) .or_else(|| { let timestamp_secs = s.strip_prefix('@')?.parse().ok()?; - NaiveDateTime::from_timestamp_opt(timestamp_secs, 0)? - .and_local_timezone(Utc) - .latest() - .map(Into::into) + DateTime::from_timestamp(timestamp_secs, 0).map(Into::into) }) .map(|dt| dt.into()) }) From 1031325ccab374f400be1ae232947959048a25e7 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 28 Apr 2024 17:30:44 -0400 Subject: [PATCH 25/26] filesystem: Remove a redundant as_str() --- src/filesystem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem.rs b/src/filesystem.rs index 83e55c9..2a642ed 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -128,7 +128,7 @@ pub fn strip_current_dir(path: &Path) -> &Path { pub fn default_path_separator() -> Option { if cfg!(windows) { let msystem = env::var("MSYSTEM").ok()?; - if !msystem.as_str().is_empty() { + if !msystem.is_empty() { return Some("/".to_owned()); } } From e10a4eab2bbf9702c5262d91c438d7841d259619 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Sun, 28 Apr 2024 00:15:08 -0600 Subject: [PATCH 26/26] Stop ignore .git folders by default Fixes: #1457 See: #1396, #1403 --- CHANGELOG.md | 4 ++++ README.md | 3 +++ doc/fd.1 | 28 +++++++++++++++++++++++----- src/cli.rs | 5 ++--- src/walk.rs | 4 ---- tests/tests.rs | 9 ++++++++- 6 files changed, 40 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1717b85..4b84cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - Add `dir` as an alias to `directory` when using `-t` \ `--type`, see #1460 and #1464 (@Ato2207). - Add support for @%s date format in time filters similar to GNU date (seconds since Unix epoch for --older/--newer), see #1493 (@nabellows) +- Breaking: No longer automatically ignore `.git` when using `--hidden` with vcs ignore enabled. This reverts the change in v9.0.0. While this feature + was often useful, it also broke some existing workflows, and there wasn't a good way to opt out of it. And there isn't really a good way for us to add + a way to opt out of it. And you can easily get similar behavior by adding `.git/` to your global fdignore file. + See #1457. ## Bugfixes diff --git a/README.md b/README.md index c52cf40..ddef3d1 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,9 @@ If you want `fd` to ignore these patterns globally, you can put them in `fd`'s g This is usually located in `~/.config/fd/ignore` in macOS or Linux, and `%APPDATA%\fd\ignore` in Windows. +You may wish to include `.git/` in your `fd/ignore` file so that `.git` directories, and their contents +are not included in output if you use the `--hidden` option. + ### Deleting files You can use `fd` to remove all files and directories that are matched by your search pattern. diff --git a/doc/fd.1 b/doc/fd.1 index 1ac63c5..498981f 100644 --- a/doc/fd.1 +++ b/doc/fd.1 @@ -33,16 +33,14 @@ with the '\-\-glob' option. By default .B fd will exclude hidden files and directories, as well as any files that match gitignore rules -or ignore rules in .ignore or .fdignore files. For convenenience, '.git' is treated as if it -was always included in gitignore rules. These files can be included with options such as -'\-\-hidden' and '\-\-no\-ignore'. +or ignore rules in .ignore or .fdignore files. .SH OPTIONS .TP .B \-H, \-\-hidden Include hidden files and directories in the search results (default: hidden files and directories are skipped). The flag can be overridden with '--no-hidden'. .IP -Ignored files and .git/ are still excluded unless \-\-no\-ignore or \-\-no\-ignore\-vcs +Ignored files are still excluded unless \-\-no\-ignore or \-\-no\-ignore\-vcs is also used. .TP .B \-I, \-\-no\-ignore @@ -79,7 +77,6 @@ and the global gitignore configuration .RI ( core.excludesFile git setting, which defaults to .IR $HOME/.config/git/ignore ). -The pattern ".git/" is automatically added to the list of VCS ignore rules. The flag can be overridden with '--ignore-vcs'. .TP .B \-\-no\-require\-git @@ -494,6 +491,17 @@ is set, use .IR $XDG_CONFIG_HOME/fd/ignore . Otherwise, use .IR $HOME/.config/fd/ignore . +.SH FILES +.TP +.B .fdignore +This file works similarly to a .gitignore file anywhere in the searched tree and specifies patterns +that should be excluded from the search. However, this file is specific to fd, and will be used even +if the --no-ignore-vcs option is used. +.TP +.B $XDG_CONFIG_HOME/fd/ignore +Global ignore file. Unless ignore mode is turned off (such as with --no-ignore) +ignore entries in this file will be ignored, as if it was an .fdignore file in the +current directory. .SH EXAMPLES .TP .RI "Find files and directories that match the pattern '" needle "':" @@ -507,6 +515,16 @@ $ fd -e py .TP .RI "Open all search results with vim:" $ fd pattern -X vim +.SH Tips and Tricks +.IP \[bu] +If you add ".git/" to your global ignore file ($XDG_CONFIG_HOME/fd/ignore), then +".git" folders will be ignored by default, even when the --hidden option is used. +.IP \[bu] +You can use a shell alias or a wrapper script in order to pass desired flags to fd +by default. For example if you do not like the default behavior of respecting gitignore, +you can use +`alias fd="/usr/bin/fd --no-ignore-vcs"` +in your .bashrc to create an alias for fd that doesn't ignore git files by default. .SH BUGS Bugs can be reported on GitHub: https://github.com/sharkdp/fd/issues .SH SEE ALSO diff --git a/src/cli.rs b/src/cli.rs index 6e61636..746773a 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -49,8 +49,7 @@ pub struct Opts { no_hidden: (), /// Show search results from files and directories that would otherwise be - /// ignored by '.gitignore', '.ignore', '.fdignore', the global ignore file, - /// or the default rule that excludes .git/. + /// ignored by '.gitignore', '.ignore', '.fdignore', or the global ignore file, /// The flag can be overridden with --ignore. #[arg( long, @@ -64,7 +63,7 @@ pub struct Opts { #[arg(long, overrides_with = "no_ignore", hide = true, action = ArgAction::SetTrue)] ignore: (), - ///Show search results from '.git/' folders and files and directories that + ///Show search results from files and directories that ///would otherwise be ignored by '.gitignore' files. ///The flag can be overridden with --ignore-vcs. #[arg( diff --git a/src/walk.rs b/src/walk.rs index 08ff3fe..155d329 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -334,10 +334,6 @@ impl WorkerState { .map_err(|e| anyhow!("Malformed exclude pattern: {}", e))?; } - if config.read_vcsignore { - builder.add("!.git/").expect("Invalid exclude pattern"); - } - builder .build() .map_err(|_| anyhow!("Mismatch in exclude patterns")) diff --git a/tests/tests.rs b/tests/tests.rs index ba83141..071d1f0 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -2573,7 +2573,14 @@ fn test_git_dir() { ], ); - te.assert_output(&["--hidden", "foo"], ""); + te.assert_output( + &["--hidden", "foo"], + ".git/one/foo.a + .git/.foo + .git/a.foo + other_dir/.git/foo1 + nested/dir/.git/foo2", + ); te.assert_output(&["--no-ignore", "foo"], ""); te.assert_output( &["--hidden", "--no-ignore", "foo"],