Merge branch 'sharkdp:master' into master
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by AlbydS · committed by GitHub · parents d651a59, 31f2839 · Browse files · 19 files·+331 added−272 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
19 files+331 added−272 removed
- tests:+12 added−3 removed
- other:+319 added−269 removed
Provenance
- Commit
ffecccf- Tree
7feebc9- Author
AlbydS <119180144+AlbydST@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent 1
d651a59- Parent 2
31f2839
19 files changed+331 added−272 removed
modified:.github/workflows/CICD.yml+11 added-1 removed
42 unmodified lines43 components: rustfmt44 - uses: actions/checkout@v445 - run: cargo fmt -- --check46 47+ lint_check:48+ name: Ensure 'cargo clippy' has no warnings49+ runs-on: ubuntu-latest50+ steps:51+ - uses: dtolnay/rust-toolchain@stable52+ with:53+ components: clippy54+ - uses: actions/checkout@v455+ - run: cargo clippy --all-targets --all-features -- -Dwarnings56+57 min_version:58 name: Minimum supported rust version59 runs-on: ubuntu-20.0460 needs: crate_metadata279 unmodified lines340 unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi341 echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT342 343 - name: Publish archives and packages334- uses: softprops/action-gh-release@v1344+ uses: softprops/action-gh-release@v2345 if: steps.is-release.outputs.IS_RELEASE346 with:347 files: |348 ${{ steps.package.outputs.PKG_PATH }}15 unmodified linesadded:doc/sponsors/terminal_trove_green.svg+5 added
1+<svg width="816" height="214" viewBox="0 0 816 214" fill="none" xmlns="http://www.w3.org/2000/svg">2+<rect width="816" height="214" fill="#B7FFA6"/>3+<path d="M254.144 131V86.072H237.944V80.6H276.392V86.072H260.192V131H254.144ZM293.26 132.008C289.708 132.008 286.588 131.264 283.9 129.776C281.212 128.24 279.124 126.104 277.636 123.368C276.148 120.632 275.404 117.464 275.404 113.864V113C275.404 109.352 276.148 106.16 277.636 103.424C279.124 100.688 281.188 98.576 283.828 97.088C286.468 95.552 289.492 94.784 292.9 94.784C296.212 94.784 299.14 95.504 301.684 96.944C304.228 98.336 306.22 100.352 307.66 102.992C309.1 105.632 309.82 108.728 309.82 112.28V114.872H281.092C281.236 118.664 282.46 121.64 284.764 123.8C287.068 125.912 289.948 126.968 293.404 126.968C296.428 126.968 298.756 126.272 300.388 124.88C302.02 123.488 303.268 121.832 304.132 119.912L309.028 122.288C308.308 123.776 307.3 125.264 306.004 126.752C304.756 128.24 303.1 129.488 301.036 130.496C299.02 131.504 296.428 132.008 293.26 132.008ZM281.164 110.192H304.06C303.868 106.928 302.74 104.384 300.676 102.56C298.66 100.736 296.068 99.824 292.9 99.824C289.684 99.824 287.044 100.736 284.98 102.56C282.916 104.384 281.644 106.928 281.164 110.192ZM319.742 131V95.792H325.286V100.112H326.294C326.918 98.576 327.878 97.448 329.174 96.728C330.47 96.008 332.174 95.648 334.286 95.648H338.462V100.832H333.926C331.382 100.832 329.318 101.552 327.734 102.992C326.198 104.384 325.43 106.568 325.43 109.544V131H319.742ZM346.882 131V95.792H352.426V100.184H353.434C354.106 98.936 355.21 97.784 356.746 96.728C358.282 95.672 360.442 95.144 363.226 95.144C365.962 95.144 368.17 95.744 369.85 96.944C371.578 98.144 372.826 99.608 373.594 101.336H374.602C375.418 99.608 376.642 98.144 378.274 96.944C379.954 95.744 382.282 95.144 385.258 95.144C387.61 95.144 389.674 95.624 391.45 96.584C393.226 97.544 394.618 98.936 395.626 100.76C396.682 102.536 397.21 104.672 397.21 107.168V131H391.522V107.672C391.522 105.32 390.826 103.472 389.434 102.128C388.09 100.736 386.194 100.04 383.746 100.04C381.154 100.04 379.018 100.88 377.338 102.56C375.706 104.24 374.89 106.664 374.89 109.832V131H369.202V107.672C369.202 105.32 368.506 103.472 367.114 102.128C365.77 100.736 363.874 100.04 361.426 100.04C358.834 100.04 356.698 100.88 355.018 102.56C353.386 104.24 352.57 106.664 352.57 109.832V131H346.882ZM408.828 131V95.792H414.516V131H408.828ZM411.708 90.32C410.46 90.32 409.404 89.912 408.54 89.096C407.724 88.28 407.316 87.248 407.316 86C407.316 84.704 407.724 83.648 408.54 82.832C409.404 82.016 410.46 81.608 411.708 81.608C412.956 81.608 413.988 82.016 414.804 82.832C415.62 83.648 416.028 84.704 416.028 86C416.028 87.248 415.62 88.28 414.804 89.096C413.988 89.912 412.956 90.32 411.708 90.32ZM426.476 131V95.792H432.02V101.768H433.028C433.796 100.088 435.092 98.576 436.916 97.232C438.788 95.84 441.524 95.144 445.124 95.144C447.764 95.144 450.116 95.696 452.18 96.8C454.292 97.904 455.972 99.536 457.22 101.696C458.468 103.856 459.092 106.52 459.092 109.688V131H453.404V110.12C453.404 106.616 452.516 104.072 450.74 102.488C449.012 100.904 446.66 100.112 443.684 100.112C440.276 100.112 437.492 101.216 435.332 103.424C433.22 105.632 432.164 108.92 432.164 113.288V131H426.476ZM481.432 132.008C478.984 132.008 476.752 131.576 474.736 130.712C472.72 129.848 471.136 128.6 469.984 126.968C468.832 125.336 468.256 123.344 468.256 120.992C468.256 118.592 468.832 116.624 469.984 115.088C471.136 113.504 472.72 112.328 474.736 111.56C476.752 110.744 479.008 110.336 481.504 110.336H493.384V107.744C493.384 105.248 492.64 103.28 491.152 101.84C489.712 100.4 487.552 99.68 484.672 99.68C481.84 99.68 479.632 100.376 478.048 101.768C476.464 103.112 475.384 104.936 474.808 107.24L469.48 105.512C470.056 103.544 470.968 101.768 472.216 100.184C473.464 98.552 475.12 97.256 477.184 96.296C479.296 95.288 481.816 94.784 484.744 94.784C489.256 94.784 492.76 95.96 495.256 98.312C497.752 100.616 499 103.88 499 108.104V124.016C499 125.456 499.672 126.176 501.016 126.176H504.256V131H499.288C497.704 131 496.432 130.568 495.472 129.704C494.512 128.792 494.032 127.592 494.032 126.104V125.744H493.168C492.64 126.656 491.92 127.616 491.008 128.624C490.144 129.584 488.944 130.376 487.408 131C485.872 131.672 483.88 132.008 481.432 132.008ZM482.08 127.112C485.44 127.112 488.152 126.128 490.216 124.16C492.328 122.144 493.384 119.336 493.384 115.736V114.944H481.72C479.464 114.944 477.592 115.448 476.104 116.456C474.664 117.416 473.944 118.88 473.944 120.848C473.944 122.816 474.688 124.352 476.176 125.456C477.712 126.56 479.68 127.112 482.08 127.112ZM512.046 131V80.6H517.734V131H512.046ZM558.457 131V86.072H542.257V80.6H580.705V86.072H564.505V131H558.457ZM583.132 131V95.792H588.676V100.112H589.684C590.308 98.576 591.268 97.448 592.564 96.728C593.86 96.008 595.564 95.648 597.676 95.648H601.852V100.832H597.316C594.772 100.832 592.708 101.552 591.124 102.992C589.588 104.384 588.82 106.568 588.82 109.544V131H583.132ZM625.279 132.008C621.727 132.008 618.583 131.264 615.847 129.776C613.159 128.288 611.047 126.2 609.511 123.512C608.023 120.776 607.279 117.56 607.279 113.864V112.928C607.279 109.28 608.023 106.088 609.511 103.352C611.047 100.616 613.159 98.504 615.847 97.016C618.583 95.528 621.727 94.784 625.279 94.784C628.831 94.784 631.951 95.528 634.639 97.016C637.375 98.504 639.487 100.616 640.975 103.352C642.511 106.088 643.279 109.28 643.279 112.928V113.864C643.279 117.56 642.511 120.776 640.975 123.512C639.487 126.2 637.375 128.288 634.639 129.776C631.951 131.264 628.831 132.008 625.279 132.008ZM625.279 126.896C629.023 126.896 631.999 125.72 634.207 123.368C636.463 120.968 637.591 117.752 637.591 113.72V113.072C637.591 109.04 636.463 105.848 634.207 103.496C631.999 101.096 629.023 99.896 625.279 99.896C621.583 99.896 618.607 101.096 616.351 103.496C614.095 105.848 612.967 109.04 612.967 113.072V113.72C612.967 117.752 614.095 120.968 616.351 123.368C618.607 125.72 621.583 126.896 625.279 126.896ZM660.967 131L648.367 95.792H654.415L664.999 126.752H666.007L676.591 95.792H682.639L670.039 131H660.967ZM705.502 132.008C701.95 132.008 698.83 131.264 696.142 129.776C693.454 128.24 691.366 126.104 689.878 123.368C688.39 120.632 687.646 117.464 687.646 113.864V113C687.646 109.352 688.39 106.16 689.878 103.424C691.366 100.688 693.43 98.576 696.07 97.088C698.71 95.552 701.734 94.784 705.142 94.784C708.454 94.784 711.382 95.504 713.926 96.944C716.47 98.336 718.462 100.352 719.902 102.992C721.342 105.632 722.062 108.728 722.062 112.28V114.872H693.334C693.478 118.664 694.702 121.64 697.006 123.8C699.31 125.912 702.19 126.968 705.646 126.968C708.67 126.968 710.998 126.272 712.63 124.88C714.262 123.488 715.51 121.832 716.374 119.912L721.27 122.288C720.55 123.776 719.542 125.264 718.246 126.752C716.998 128.24 715.342 129.488 713.278 130.496C711.262 131.504 708.67 132.008 705.502 132.008ZM693.406 110.192H716.302C716.11 106.928 714.982 104.384 712.918 102.56C710.902 100.736 708.31 99.824 705.142 99.824C701.926 99.824 699.286 100.736 697.222 102.56C695.158 104.384 693.886 106.928 693.406 110.192Z" fill="black"/>4+<path d="M73.72 88.384H88.696V68.8H96.184V88.384H114.616V95.296H96.184V126.208C96.184 128.128 97.048 129.088 98.776 129.088H112.312V136H96.088C93.912 136 92.12 135.296 90.712 133.888C89.368 132.48 88.696 130.688 88.696 128.512V95.296H73.72V88.384ZM132.789 140.608H177.525V147.52H132.789V140.608Z" fill="black"/>5+</svg>modified:doc/fd.1+31 added-9 removed
31 unmodified lines32 .P33 By default34 .B fd35 will exclude hidden files and directories, as well as any files that match gitignore rules36-or ignore rules in .ignore or .fdignore files. For convenenience, '.git' is treated as if it37-was always included in gitignore rules. These files can be included with options such as38-'\-\-hidden' and '\-\-no\-ignore'.36+or ignore rules in .ignore or .fdignore files.37 .SH OPTIONS38 .TP39 .B \-H, \-\-hidden40 Include hidden files and directories in the search results41 (default: hidden files and directories are skipped). The flag can be overridden with '--no-hidden'.42 .IP45-Ignored files and .git/ are still excluded unless \-\-no\-ignore or \-\-no\-ignore\-vcs43+Ignored files are still excluded unless \-\-no\-ignore or \-\-no\-ignore\-vcs44 is also used.45 .TP46 .B \-I, \-\-no\-ignore47 Show search results from files and directories that would otherwise be ignored by28 unmodified lines76 and the global gitignore configuration77 .RI ( core.excludesFile78 git setting, which defaults to79 .IR $HOME/.config/git/ignore ).82-The pattern ".git/" is automatically added to the list of VCS ignore rules.80 The flag can be overridden with '--ignore-vcs'.81 .TP82 .B \-\-no\-require\-git83 Do not require a git repository to respect gitignores. By default, fd will only224 unmodified lines308 .BI "\-\-changed-within " date|duration309 Filter results based on the file modification time.310 Files with modification times greater than the argument will be returned.311 The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point315-in time in either full RFC3339 format with time zone, or as a date or datetime in the316-local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).312+in time as full RFC3339 format with time zone, as a date or datetime in the313+local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR), or as the prefix '@'314+followed by the number of seconds since the Unix epoch (@[0-9]+).315 \fB\-\-change-newer-than\fR,316 .B --newer317 or318 .B --changed-after2 unmodified lines321 Examples:322 \-\-changed-within 2weeks323 \-\-change-newer-than "2018-10-27 10:00:00"324 \-\-newer 2018-10-27325+ \-\-changed-after @1704067200326 .TP327 .BI "\-\-changed-before " date|duration328 Filter results based on the file modification time.329 Files with modification times less than the argument will be returned.330 The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point332-in time in either full RFC3339 format with time zone, or as a date or datetime in the333-local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).331+in time as full RFC3339 format with time zone, as a date or datetime in the332+local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR), or as the prefix '@'333+followed by the number of seconds since the Unix epoch (@[0-9]+).334 .B --change-older-than335 or336 .B --older337 can be used as aliases.338 339 Examples:340 \-\-changed-before "2018-10-27 10:00:00"341 \-\-change-older-than 2weeks342+ \-\-older @1704067200343 .TP344 .BI "-o, \-\-owner " [user][:group]345 Filter files by their user and/or group. Format: [(user|uid)][:(group|gid)]. Either side346 is optional. Precede either side with a '!' to exclude files instead.143 unmodified lines490 is set, use491 .IR $XDG_CONFIG_HOME/fd/ignore .492 Otherwise, use493 .IR $HOME/.config/fd/ignore .494+.SH FILES495+.TP496+.B .fdignore497+This file works similarly to a .gitignore file anywhere in the searched tree and specifies patterns498+that should be excluded from the search. However, this file is specific to fd, and will be used even499+if the --no-ignore-vcs option is used.500+.TP501+.B $XDG_CONFIG_HOME/fd/ignore502+Global ignore file. Unless ignore mode is turned off (such as with --no-ignore)503+ignore entries in this file will be ignored, as if it was an .fdignore file in the504+current directory.505 .SH EXAMPLES506 .TP507 .RI "Find files and directories that match the pattern '" needle "':"508 $ fd needle5 unmodified lines514 $ fd -e py515 .TP516 .RI "Open all search results with vim:"517 $ fd pattern -X vim518+.SH Tips and Tricks519+.IP \[bu]520+If you add ".git/" to your global ignore file ($XDG_CONFIG_HOME/fd/ignore), then521+".git" folders will be ignored by default, even when the --hidden option is used.522+.IP \[bu]523+You can use a shell alias or a wrapper script in order to pass desired flags to fd524+by default. For example if you do not like the default behavior of respecting gitignore,525+you can use526+`alias fd="/usr/bin/fd --no-ignore-vcs"`527+in your .bashrc to create an alias for fd that doesn't ignore git files by default.528 .SH BUGS529 Bugs can be reported on GitHub: https://github.com/sharkdp/fd/issues530 .SH SEE ALSO531 .BR find (1)added:doc/sponsors.md+14 added
1234567891011121314## 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 - thefeatures added, bugs solved, and effect on the overall complexity of the code.No issue will have a different priority based on sponsorship status of thereporter.
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).modified:src/exec/input.rs+2 added-2 removed
32 unmodified lines33 34 #[cfg(test)]35 mod path_tests {36 use super::*;37- use std::path::MAIN_SEPARATOR;37+ use std::path::MAIN_SEPARATOR_STR;38 39 fn correct(input: &str) -> String {40- input.replace('/', &MAIN_SEPARATOR.to_string())40+ input.replace('/', MAIN_SEPARATOR_STR)41 }42 43 macro_rules! func_tests {44 ($($name:ident: $func:ident for $input:expr => $output:expr)+) => {43 unmodified linesmodified:src/exec/token.rs+1 added-1 removed
39 unmodified lines40 let mut tokens = Vec::new();41 let mut remaining = input;42 let mut buf = String::new();43 let placeholders = PLACEHOLDERS.get_or_init(|| {44- AhoCorasick::new(&["{{", "}}", "{}", "{/}", "{//}", "{.}", "{/.}"]).unwrap()44+ AhoCorasick::new(["{{", "}}", "{}", "{/}", "{//}", "{.}", "{/.}"]).unwrap()45 });46 while let Some(m) = placeholders.find(remaining) {47 match m.pattern().as_u32() {48 0 | 1 => {50 unmodified linesmodified:src/filter/time.rs+31 added
29 unmodified lines30 .ok()?31 .and_local_timezone(Local)32 .latest()33 })34+ .or_else(|| {35+ let timestamp_secs = s.strip_prefix('@')?.parse().ok()?;36+ DateTime::from_timestamp(timestamp_secs, 0).map(Into::into)37+ })38 .map(|dt| dt.into())39 })40 }41 96 unmodified lines138 .applies_to(&ref_time));139 assert!(!TimeFilter::after(&ref_time, t10s_before)140 .unwrap()141 .applies_to(&t1m_ago));142+143+ let ref_timestamp = 1707723412u64; // Mon Feb 12 07:36:52 UTC 2024144+ let ref_time = DateTime::parse_from_rfc3339("2024-02-12T07:36:52+00:00")145+ .unwrap()146+ .into();147+ let t1m_ago = ref_time - Duration::from_secs(60);148+ let t1s_later = ref_time + Duration::from_secs(1);149+ // Timestamp only supported via '@' prefix150+ assert!(TimeFilter::before(&ref_time, &ref_timestamp.to_string()).is_none());151+ assert!(152+ TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp))153+ .unwrap()154+ .applies_to(&t1m_ago)155+ );156+ assert!(157+ !TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp))158+ .unwrap()159+ .applies_to(&t1s_later)160+ );161+ assert!(162+ !TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp))163+ .unwrap()164+ .applies_to(&t1m_ago)165+ );166+ assert!(TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp))167+ .unwrap()168+ .applies_to(&t1s_later));169 }170 }modified:src/cli.rs+2 added-3 removed
47 unmodified lines48 #[arg(long, overrides_with = "hidden", hide = true, action = ArgAction::SetTrue)]49 no_hidden: (),50 51 /// Show search results from files and directories that would otherwise be52- /// ignored by '.gitignore', '.ignore', '.fdignore', the global ignore file,53- /// or the default rule that excludes .git/.52+ /// ignored by '.gitignore', '.ignore', '.fdignore', or the global ignore file,53 /// The flag can be overridden with --ignore.54 #[arg(55 long,56 short = 'I',5 unmodified lines62 /// Overrides --no-ignore63 #[arg(long, overrides_with = "no_ignore", hide = true, action = ArgAction::SetTrue)]64 ignore: (),65 67- ///Show search results from '.git/' folders and files and directories that66+ ///Show search results from files and directories that67 ///would otherwise be ignored by '.gitignore' files.68 ///The flag can be overridden with --ignore-vcs.69 #[arg(70 long,803 unmodified linesmodified:src/dir_entry.rs+1 added-1 removed
111 unmodified lines112 113 impl PartialOrd for DirEntry {114 #[inline]115 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {116- self.path().partial_cmp(other.path())116+ Some(self.cmp(other))117 }118 }119 120 impl Ord for DirEntry {35 unmodified linesmodified:src/filesystem.rs+3 added-5 removed
126 unmodified lines127 /// platform.128 pub fn default_path_separator() -> Option<String> {129 if cfg!(windows) {130 let msystem = env::var("MSYSTEM").ok()?;131- match msystem.as_str() {132- "MINGW64" | "MINGW32" | "MSYS" => Some("/".to_owned()),133- _ => None,131+ if !msystem.is_empty() {132+ return Some("/".to_owned());133 }135- } else {136- None134 }135+ None136 }137 138 #[cfg(test)]139 mod tests {17 unmodified linesmodified:src/regex_helper.rs+1 added-1 removed
14 unmodified lines15 fn hir_has_uppercase_char(hir: &Hir) -> bool {16 use regex_syntax::hir::*;17 18 match hir.kind() {19- HirKind::Literal(Literal(bytes)) => match std::str::from_utf8(&bytes) {19+ HirKind::Literal(Literal(bytes)) => match std::str::from_utf8(bytes) {20 Ok(s) => s.chars().any(|c| c.is_uppercase()),21 Err(_) => bytes.iter().any(|b| char::from(*b).is_uppercase()),22 },23 HirKind::Class(Class::Unicode(ranges)) => ranges82 unmodified linesmodified:src/walk.rs+4 added-8 removed
10 unmodified lines11 use anyhow::{anyhow, Result};12 use crossbeam_channel::{bounded, Receiver, RecvTimeoutError, SendError, Sender};13 use etcetera::BaseStrategy;14 use ignore::overrides::{Override, OverrideBuilder};15-use ignore::{self, WalkBuilder, WalkParallel, WalkState};15+use ignore::{WalkBuilder, WalkParallel, WalkState};16 use regex::bytes::Regex;17 18 use crate::config::Config;19 use crate::dir_entry::DirEntry;229 unmodified lines249 }250 251 /// Output a path.252 fn print(&mut self, entry: &DirEntry) -> Result<(), ExitCode> {253- output::print_entry(&mut self.stdout, entry, &self.config);253+ output::print_entry(&mut self.stdout, entry, self.config);254 255 if self.interrupt_flag.load(Ordering::Relaxed) {256 // Ignore any errors on flush, because we're about to exit anyway257 let _ = self.flush();75 unmodified lines333 .add(pattern)334 .map_err(|e| anyhow!("Malformed exclude pattern: {}", e))?;335 }336 337- if config.read_vcsignore {338- builder.add("!.git/").expect("Invalid exclude pattern");339- }340-337 builder338 .build()339 .map_err(|_| anyhow!("Mismatch in exclude patterns"))340 }67 unmodified lines408 409 // This will be set to `Some` if the `--exec` argument was supplied.410 if let Some(ref cmd) = config.command {411 if cmd.in_batch_mode() {416- exec::batch(rx.into_iter().flatten(), cmd, &config)412+ exec::batch(rx.into_iter().flatten(), cmd, config)413 } else {414 let out_perm = Mutex::new(());415 416 thread::scope(|scope| {4 unmodified lines421 let rx = rx.clone();422 423 // Spawn a job thread that will listen for and execute inputs.424 let handle = scope429- .spawn(|| exec::job(rx.into_iter().flatten(), cmd, &out_perm, &config));425+ .spawn(|| exec::job(rx.into_iter().flatten(), cmd, &out_perm, config));426 427 // Push the handle of the spawned thread into the vector for later joining.428 handles.push(handle);429 }239 unmodified linesmodified:tests/testenv/mod.rs+1 added-1 removed
127 unmodified lines128 .replace('\0', "NULL\n")129 .lines()130 .map(|line| {131 let line = if trim_start { line.trim_start() } else { line };132- let line = line.replace('/', &std::path::MAIN_SEPARATOR.to_string());132+ let line = line.replace('/', std::path::MAIN_SEPARATOR_STR);133 if normalize_line {134 let mut words: Vec<_> = line.split_whitespace().collect();135 words.sort_unstable();136 return words.join(" ");215 unmodified linesmodified:tests/tests.rs+11 added-2 removed
1309 unmodified lines1310 1311 let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);1312 1313 fs::OpenOptions::new()1314- .create(true)1314+ .create_new(true)1315+ .truncate(true)1316 .write(true)1317 .mode(0o777)1318 .open(te.test_root().join("executable-file.sh"))1319 .unwrap();1320 1321 fs::OpenOptions::new()1322 .create(true)1323+ .truncate(true)1324 .write(true)1325 .mode(0o645)1326 .open(te.test_root().join("not-user-executable-file.sh"))1327 .unwrap();1244 unmodified lines2572 "nested/dir/.git/foo2",2573 ],2574 );2575 2574- te.assert_output(&["--hidden", "foo"], "");2576+ te.assert_output(2577+ &["--hidden", "foo"],2578+ ".git/one/foo.a2579+ .git/.foo2580+ .git/a.foo2581+ other_dir/.git/foo12582+ nested/dir/.git/foo2",2583+ );2584 te.assert_output(&["--no-ignore", "foo"], "");2585 te.assert_output(2586 &["--hidden", "--no-ignore", "foo"],2587 ".git/one/foo.a14 unmodified linesmodified:Cargo.lock+176 added-222 removed
2 unmodified lines3 version = 34 5 [[package]]6 name = "aho-corasick"7-version = "1.1.2"7+version = "1.1.3"8 source = "registry+https://github.com/rust-lang/crates.io-index"9-checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"9+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"10 dependencies = [11 "memchr",12 ]13 13 unmodified lines27 ]28 29 [[package]]30 name = "anstream"31-version = "0.6.4"31+version = "0.6.13"32 source = "registry+https://github.com/rust-lang/crates.io-index"33-checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"33+checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"34 dependencies = [35 "anstyle",36 "anstyle-parse",37 "anstyle-query",3 unmodified lines41 ]42 43 [[package]]44 name = "anstyle"45-version = "1.0.4"45+version = "1.0.6"46 source = "registry+https://github.com/rust-lang/crates.io-index"47-checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"47+checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc"48 49 [[package]]50 name = "anstyle-parse"51-version = "0.2.2"51+version = "0.2.3"52 source = "registry+https://github.com/rust-lang/crates.io-index"53-checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"53+checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"54 dependencies = [55 "utf8parse",56 ]57 58 [[package]]59 name = "anstyle-query"60-version = "1.0.0"60+version = "1.0.2"61 source = "registry+https://github.com/rust-lang/crates.io-index"62-checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"62+checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"63 dependencies = [64- "windows-sys 0.48.0",64+ "windows-sys 0.52.0",65 ]66 67 [[package]]68 name = "anstyle-wincon"69-version = "3.0.1"69+version = "3.0.2"70 source = "registry+https://github.com/rust-lang/crates.io-index"71-checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"71+checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"72 dependencies = [73 "anstyle",74- "windows-sys 0.48.0",74+ "windows-sys 0.52.0",75 ]76 77 [[package]]78 name = "anyhow"79-version = "1.0.75"79+version = "1.0.82"80 source = "registry+https://github.com/rust-lang/crates.io-index"81-checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"81+checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"82 83 [[package]]84 name = "argmax"85 version = "0.3.1"6 unmodified lines92 ]93 94 [[package]]95 name = "autocfg"96-version = "1.1.0"96+version = "1.2.0"97 source = "registry+https://github.com/rust-lang/crates.io-index"98-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"98+checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"99 100 [[package]]101 name = "bitflags"102 version = "1.3.2"1 unmodified line104 checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"105 106 [[package]]107 name = "bitflags"108-version = "2.4.1"108+version = "2.5.0"109 source = "registry+https://github.com/rust-lang/crates.io-index"110-checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"110+checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"111 112 [[package]]113 name = "bstr"114-version = "1.7.0"114+version = "1.9.1"115 source = "registry+https://github.com/rust-lang/crates.io-index"116-checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019"116+checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706"117 dependencies = [118 "memchr",119 "serde",120 ]121 122 [[package]]123 name = "bumpalo"124-version = "3.14.0"124+version = "3.16.0"125 source = "registry+https://github.com/rust-lang/crates.io-index"126-checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"126+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"127 128 [[package]]129 name = "cc"130-version = "1.0.83"130+version = "1.0.92"131 source = "registry+https://github.com/rust-lang/crates.io-index"132-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"133-dependencies = [134- "libc",135-]132+checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41"133 134 [[package]]135 name = "cfg-if"136 version = "1.0.0"137 source = "registry+https://github.com/rust-lang/crates.io-index"138 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"139 140 [[package]]141+name = "cfg_aliases"142+version = "0.1.1"143+source = "registry+https://github.com/rust-lang/crates.io-index"144+checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"145+146+[[package]]147 name = "chrono"145-version = "0.4.31"148+version = "0.4.37"149 source = "registry+https://github.com/rust-lang/crates.io-index"147-checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"150+checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e"151 dependencies = [152 "android-tzdata",153 "iana-time-zone",154 "num-traits",152- "windows-targets 0.48.5",155+ "windows-targets 0.52.4",156 ]157 158 [[package]]159 name = "clap"157-version = "4.4.13"160+version = "4.5.4"161 source = "registry+https://github.com/rust-lang/crates.io-index"159-checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642"162+checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"163 dependencies = [164 "clap_builder",165 "clap_derive",166 ]167 168 [[package]]169 name = "clap_builder"167-version = "4.4.12"170+version = "4.5.2"171 source = "registry+https://github.com/rust-lang/crates.io-index"169-checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9"172+checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"173 dependencies = [174 "anstream",175 "anstyle",176 "clap_lex",2 unmodified lines179 ]180 181 [[package]]182 name = "clap_complete"180-version = "4.4.6"183+version = "4.5.2"184 source = "registry+https://github.com/rust-lang/crates.io-index"182-checksum = "97aeaa95557bd02f23fbb662f981670c3d20c5a26e69f7354b28f57092437fcd"185+checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e"186 dependencies = [187 "clap",188 ]189 190 [[package]]191 name = "clap_derive"189-version = "4.4.7"192+version = "4.5.4"193 source = "registry+https://github.com/rust-lang/crates.io-index"191-checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"194+checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64"195 dependencies = [196 "heck",197 "proc-macro2",198 "quote",196- "syn 2.0.38",199+ "syn",200 ]201 202 [[package]]203 name = "clap_lex"201-version = "0.6.0"204+version = "0.7.0"205 source = "registry+https://github.com/rust-lang/crates.io-index"203-checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"206+checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"207 208 [[package]]209 name = "colorchoice"210 version = "1.0.0"1 unmodified line212 checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"213 214 [[package]]215 name = "core-foundation-sys"213-version = "0.8.4"216+version = "0.8.6"217 source = "registry+https://github.com/rust-lang/crates.io-index"215-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"218+checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"219 220 [[package]]221 name = "crossbeam-channel"219-version = "0.5.10"222+version = "0.5.12"223 source = "registry+https://github.com/rust-lang/crates.io-index"221-checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2"224+checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95"225 dependencies = [223- "cfg-if",226 "crossbeam-utils",227 ]228 229 [[package]]230 name = "crossbeam-deque"229-version = "0.8.3"231+version = "0.8.5"232 source = "registry+https://github.com/rust-lang/crates.io-index"231-checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"233+checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"234 dependencies = [233- "cfg-if",235 "crossbeam-epoch",236 "crossbeam-utils",237 ]238 239 [[package]]240 name = "crossbeam-epoch"240-version = "0.9.15"241+version = "0.9.18"242 source = "registry+https://github.com/rust-lang/crates.io-index"242-checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"243+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"244 dependencies = [244- "autocfg",245- "cfg-if",245 "crossbeam-utils",247- "memoffset",248- "scopeguard",246 ]247 248 [[package]]249 name = "crossbeam-utils"253-version = "0.8.18"250+version = "0.8.19"251 source = "registry+https://github.com/rust-lang/crates.io-index"255-checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c"256-dependencies = [257- "cfg-if",258-]252+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"253 254 [[package]]255 name = "ctrlc"262-version = "3.4.1"256+version = "3.4.4"257 source = "registry+https://github.com/rust-lang/crates.io-index"264-checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf"258+checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345"259 dependencies = [266- "nix 0.27.1",267- "windows-sys 0.48.0",260+ "nix 0.28.0",261+ "windows-sys 0.52.0",262 ]263 264 [[package]]265 name = "diff"34 unmodified lines300 ]301 302 [[package]]303 name = "fastrand"310-version = "2.0.1"304+version = "2.0.2"305 source = "registry+https://github.com/rust-lang/crates.io-index"312-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"306+checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984"307 308 [[package]]309 name = "fd-find"310 version = "9.0.0"52 unmodified lines363 ]364 365 [[package]]366 name = "heck"373-version = "0.4.1"367+version = "0.5.0"368 source = "registry+https://github.com/rust-lang/crates.io-index"375-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"369+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"370 371 [[package]]372 name = "home"379-version = "0.5.5"373+version = "0.5.9"374 source = "registry+https://github.com/rust-lang/crates.io-index"381-checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"375+checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"376 dependencies = [383- "windows-sys 0.48.0",377+ "windows-sys 0.52.0",378 ]379 380 [[package]]381 name = "humantime"2 unmodified lines384 checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"385 386 [[package]]387 name = "iana-time-zone"394-version = "0.1.58"388+version = "0.1.60"389 source = "registry+https://github.com/rust-lang/crates.io-index"396-checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"390+checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"391 dependencies = [392 "android_system_properties",393 "core-foundation-sys",394 "iana-time-zone-haiku",12 unmodified lines407 ]408 409 [[package]]410 name = "ignore"417-version = "0.4.21"411+version = "0.4.22"412 source = "registry+https://github.com/rust-lang/crates.io-index"419-checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060"413+checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1"414 dependencies = [415 "crossbeam-deque",416 "globset",417 "log",25 unmodified lines443 ]444 445 [[package]]446 name = "js-sys"453-version = "0.3.64"447+version = "0.3.69"448 source = "registry+https://github.com/rust-lang/crates.io-index"455-checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"449+checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"450 dependencies = [451 "wasm-bindgen",452 ]453 4 unmodified lines458 checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"459 460 [[package]]461 name = "libc"468-version = "0.2.151"462+version = "0.2.153"463 source = "registry+https://github.com/rust-lang/crates.io-index"470-checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"464+checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"465 466 [[package]]467 name = "linux-raw-sys"474-version = "0.4.12"468+version = "0.4.13"469 source = "registry+https://github.com/rust-lang/crates.io-index"476-checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"470+checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"471 472 [[package]]473 name = "log"480-version = "0.4.20"474+version = "0.4.21"475 source = "registry+https://github.com/rust-lang/crates.io-index"482-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"476+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"477 478 [[package]]479 name = "lscolors"486-version = "0.16.0"480+version = "0.17.0"481 source = "registry+https://github.com/rust-lang/crates.io-index"488-checksum = "ab0b209ec3976527806024406fe765474b9a1750a0ed4b8f0372364741f50e7b"482+checksum = "53304fff6ab1e597661eee37e42ea8c47a146fca280af902bb76bff8a896e523"483 dependencies = [484 "nu-ansi-term",485 ]486 487 [[package]]488 name = "memchr"495-version = "2.6.4"489+version = "2.7.2"490 source = "registry+https://github.com/rust-lang/crates.io-index"497-checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"491+checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"492 493 [[package]]500-name = "memoffset"501-version = "0.9.0"502-source = "registry+https://github.com/rust-lang/crates.io-index"503-checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"504-dependencies = [505- "autocfg",506-]507-508-[[package]]494 name = "nix"495 version = "0.24.3"496 source = "registry+https://github.com/rust-lang/crates.io-index"497 checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069"8 unmodified lines506 version = "0.27.1"507 source = "registry+https://github.com/rust-lang/crates.io-index"508 checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"509 dependencies = [525- "bitflags 2.4.1",510+ "bitflags 2.5.0",511 "cfg-if",512 "libc",513 ]514 515 [[package]]516+name = "nix"517+version = "0.28.0"518+source = "registry+https://github.com/rust-lang/crates.io-index"519+checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"520+dependencies = [521+ "bitflags 2.5.0",522+ "cfg-if",523+ "cfg_aliases",524+ "libc",525+]526+527+[[package]]528 name = "normpath"532-version = "1.1.1"529+version = "1.2.0"530 source = "registry+https://github.com/rust-lang/crates.io-index"534-checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5"531+checksum = "5831952a9476f2fed74b77d74182fa5ddc4d21c72ec45a333b250e3ed0272804"532 dependencies = [536- "windows-sys 0.48.0",533+ "windows-sys 0.52.0",534 ]535 536 [[package]]537 name = "nu-ansi-term"541-version = "0.49.0"538+version = "0.50.0"539 source = "registry+https://github.com/rust-lang/crates.io-index"543-checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68"540+checksum = "dd2800e1520bdc966782168a627aa5d1ad92e33b984bf7c7615d31280c83ff14"541 dependencies = [542 "windows-sys 0.48.0",543 ]544 545 [[package]]546 name = "num-traits"550-version = "0.2.17"547+version = "0.2.18"548 source = "registry+https://github.com/rust-lang/crates.io-index"552-checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"549+checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"550 dependencies = [551 "autocfg",552 ]553 554 [[package]]555 name = "once_cell"559-version = "1.18.0"556+version = "1.19.0"557 source = "registry+https://github.com/rust-lang/crates.io-index"561-checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"558+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"559 560 [[package]]564-name = "proc-macro-error"565-version = "1.0.4"566-source = "registry+https://github.com/rust-lang/crates.io-index"567-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"568-dependencies = [569- "proc-macro-error-attr",570- "proc-macro2",571- "quote",572- "syn 1.0.109",573- "version_check",574-]575-576-[[package]]577-name = "proc-macro-error-attr"578-version = "1.0.4"579-source = "registry+https://github.com/rust-lang/crates.io-index"580-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"581-dependencies = [582- "proc-macro2",583- "quote",584- "version_check",585-]586-587-[[package]]561 name = "proc-macro2"589-version = "1.0.69"562+version = "1.0.79"563 source = "registry+https://github.com/rust-lang/crates.io-index"591-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"564+checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"565 dependencies = [566 "unicode-ident",567 ]568 569 [[package]]570 name = "quote"598-version = "1.0.33"571+version = "1.0.36"572 source = "registry+https://github.com/rust-lang/crates.io-index"600-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"573+checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"574 dependencies = [575 "proc-macro2",576 ]577 7 unmodified lines585 ]586 587 [[package]]588 name = "regex"616-version = "1.10.2"589+version = "1.10.4"590 source = "registry+https://github.com/rust-lang/crates.io-index"618-checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"591+checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"592 dependencies = [593 "aho-corasick",594 "memchr",595 "regex-automata",1 unmodified line597 ]598 599 [[package]]600 name = "regex-automata"628-version = "0.4.3"601+version = "0.4.6"602 source = "registry+https://github.com/rust-lang/crates.io-index"630-checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"603+checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"604 dependencies = [605 "aho-corasick",606 "memchr",607 "regex-syntax",608 ]609 610 [[package]]611 name = "regex-syntax"639-version = "0.8.2"612+version = "0.8.3"613 source = "registry+https://github.com/rust-lang/crates.io-index"641-checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"614+checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"615 616 [[package]]617 name = "rustix"645-version = "0.38.28"618+version = "0.38.32"619 source = "registry+https://github.com/rust-lang/crates.io-index"647-checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316"620+checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89"621 dependencies = [649- "bitflags 2.4.1",622+ "bitflags 2.5.0",623 "errno",624 "libc",625 "linux-raw-sys",626 "windows-sys 0.52.0",8 unmodified lines635 "winapi-util",636 ]637 638 [[package]]666-name = "scopeguard"667-version = "1.2.0"668-source = "registry+https://github.com/rust-lang/crates.io-index"669-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"670-671-[[package]]639 name = "serde"673-version = "1.0.189"640+version = "1.0.197"641 source = "registry+https://github.com/rust-lang/crates.io-index"675-checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"642+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"643 dependencies = [644 "serde_derive",645 ]646 647 [[package]]648 name = "serde_derive"682-version = "1.0.189"649+version = "1.0.197"650 source = "registry+https://github.com/rust-lang/crates.io-index"684-checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"651+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"652 dependencies = [653 "proc-macro2",654 "quote",688- "syn 2.0.38",655+ "syn",656 ]657 658 [[package]]659 name = "strsim"693-version = "0.10.0"660+version = "0.11.1"661 source = "registry+https://github.com/rust-lang/crates.io-index"695-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"662+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"663 664 [[package]]665 name = "syn"699-version = "1.0.109"666+version = "2.0.58"667 source = "registry+https://github.com/rust-lang/crates.io-index"701-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"668+checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687"669 dependencies = [670 "proc-macro2",704- "unicode-ident",705-]706-707-[[package]]708-name = "syn"709-version = "2.0.38"710-source = "registry+https://github.com/rust-lang/crates.io-index"711-checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"712-dependencies = [713- "proc-macro2",671 "quote",672 "unicode-ident",673 ]674 675 [[package]]676 name = "tempfile"720-version = "3.9.0"677+version = "3.10.1"678 source = "registry+https://github.com/rust-lang/crates.io-index"722-checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"679+checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"680 dependencies = [681 "cfg-if",682 "fastrand",726- "redox_syscall",683 "rustix",684 "windows-sys 0.52.0",685 ]686 17 unmodified lines704 ]705 706 [[package]]707 name = "test-case-core"752-version = "3.2.1"708+version = "3.3.1"709 source = "registry+https://github.com/rust-lang/crates.io-index"754-checksum = "54c25e2cb8f5fcd7318157634e8838aa6f7e4715c96637f969fabaccd1ef5462"710+checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f"711 dependencies = [712 "cfg-if",757- "proc-macro-error",713 "proc-macro2",714 "quote",760- "syn 2.0.38",715+ "syn",716 ]717 718 [[package]]719 name = "test-case-macros"765-version = "3.2.1"720+version = "3.3.1"721 source = "registry+https://github.com/rust-lang/crates.io-index"767-checksum = "37cfd7bbc88a0104e304229fba519bdc45501a30b760fb72240342f1289ad257"722+checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"723 dependencies = [769- "proc-macro-error",724 "proc-macro2",725 "quote",772- "syn 2.0.38",726+ "syn",727 "test-case-core",728 ]729 730 [[package]]15 unmodified lines746 checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"747 748 [[package]]749 name = "walkdir"796-version = "2.4.0"750+version = "2.5.0"751 source = "registry+https://github.com/rust-lang/crates.io-index"798-checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"752+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"753 dependencies = [754 "same-file",755 "winapi-util",756 ]757 758 [[package]]759 name = "wasm-bindgen"806-version = "0.2.87"760+version = "0.2.92"761 source = "registry+https://github.com/rust-lang/crates.io-index"808-checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"762+checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"763 dependencies = [764 "cfg-if",765 "wasm-bindgen-macro",766 ]767 768 [[package]]769 name = "wasm-bindgen-backend"816-version = "0.2.87"770+version = "0.2.92"771 source = "registry+https://github.com/rust-lang/crates.io-index"818-checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"772+checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"773 dependencies = [774 "bumpalo",775 "log",776 "once_cell",777 "proc-macro2",778 "quote",825- "syn 2.0.38",779+ "syn",780 "wasm-bindgen-shared",781 ]782 783 [[package]]784 name = "wasm-bindgen-macro"831-version = "0.2.87"785+version = "0.2.92"786 source = "registry+https://github.com/rust-lang/crates.io-index"833-checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"787+checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"788 dependencies = [789 "quote",790 "wasm-bindgen-macro-support",791 ]792 793 [[package]]794 name = "wasm-bindgen-macro-support"841-version = "0.2.87"795+version = "0.2.92"796 source = "registry+https://github.com/rust-lang/crates.io-index"843-checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"797+checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"798 dependencies = [799 "proc-macro2",800 "quote",847- "syn 2.0.38",801+ "syn",802 "wasm-bindgen-backend",803 "wasm-bindgen-shared",804 ]805 806 [[package]]807 name = "wasm-bindgen-shared"854-version = "0.2.87"808+version = "0.2.92"809 source = "registry+https://github.com/rust-lang/crates.io-index"856-checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"810+checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"811 812 [[package]]813 name = "winapi"814 version = "0.3.9"26 unmodified lines841 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"842 843 [[package]]844 name = "windows-core"891-version = "0.51.1"845+version = "0.52.0"846 source = "registry+https://github.com/rust-lang/crates.io-index"893-checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"847+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"848 dependencies = [895- "windows-targets 0.48.5",849+ "windows-targets 0.52.4",850 ]851 852 [[package]]853 name = "windows-sys"9 unmodified lines863 version = "0.52.0"864 source = "registry+https://github.com/rust-lang/crates.io-index"865 checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"866 dependencies = [913- "windows-targets 0.52.0",867+ "windows-targets 0.52.4",868 ]869 870 [[package]]871 name = "windows-targets"11 unmodified lines883 ]884 885 [[package]]886 name = "windows-targets"933-version = "0.52.0"887+version = "0.52.4"888 source = "registry+https://github.com/rust-lang/crates.io-index"935-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"889+checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"890 dependencies = [937- "windows_aarch64_gnullvm 0.52.0",938- "windows_aarch64_msvc 0.52.0",939- "windows_i686_gnu 0.52.0",940- "windows_i686_msvc 0.52.0",941- "windows_x86_64_gnu 0.52.0",942- "windows_x86_64_gnullvm 0.52.0",943- "windows_x86_64_msvc 0.52.0",891+ "windows_aarch64_gnullvm 0.52.4",892+ "windows_aarch64_msvc 0.52.4",893+ "windows_i686_gnu 0.52.4",894+ "windows_i686_msvc 0.52.4",895+ "windows_x86_64_gnu 0.52.4",896+ "windows_x86_64_gnullvm 0.52.4",897+ "windows_x86_64_msvc 0.52.4",898 ]899 900 [[package]]901 name = "windows_aarch64_gnullvm"2 unmodified lines904 checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"905 906 [[package]]907 name = "windows_aarch64_gnullvm"954-version = "0.52.0"908+version = "0.52.4"909 source = "registry+https://github.com/rust-lang/crates.io-index"956-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"910+checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"911 912 [[package]]913 name = "windows_aarch64_msvc"914 version = "0.48.5"1 unmodified line916 checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"917 918 [[package]]919 name = "windows_aarch64_msvc"966-version = "0.52.0"920+version = "0.52.4"921 source = "registry+https://github.com/rust-lang/crates.io-index"968-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"922+checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"923 924 [[package]]925 name = "windows_i686_gnu"926 version = "0.48.5"1 unmodified line928 checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"929 930 [[package]]931 name = "windows_i686_gnu"978-version = "0.52.0"932+version = "0.52.4"933 source = "registry+https://github.com/rust-lang/crates.io-index"980-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"934+checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"935 936 [[package]]937 name = "windows_i686_msvc"938 version = "0.48.5"1 unmodified line940 checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"941 942 [[package]]943 name = "windows_i686_msvc"990-version = "0.52.0"944+version = "0.52.4"945 source = "registry+https://github.com/rust-lang/crates.io-index"992-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"946+checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"947 948 [[package]]949 name = "windows_x86_64_gnu"950 version = "0.48.5"1 unmodified line952 checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"953 954 [[package]]955 name = "windows_x86_64_gnu"1002-version = "0.52.0"956+version = "0.52.4"957 source = "registry+https://github.com/rust-lang/crates.io-index"1004-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"958+checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"959 960 [[package]]961 name = "windows_x86_64_gnullvm"962 version = "0.48.5"1 unmodified line964 checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"965 966 [[package]]967 name = "windows_x86_64_gnullvm"1014-version = "0.52.0"968+version = "0.52.4"969 source = "registry+https://github.com/rust-lang/crates.io-index"1016-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"970+checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"971 972 [[package]]973 name = "windows_x86_64_msvc"974 version = "0.48.5"1 unmodified line976 checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"977 978 [[package]]979 name = "windows_x86_64_msvc"1026-version = "0.52.0"980+version = "0.52.4"981 source = "registry+https://github.com/rust-lang/crates.io-index"1028-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"982+checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"modified:Cargo.toml+10 added-10 removed
16 unmodified lines17 readme = "README.md"18 repository = "https://github.com/sharkdp/fd"19 version = "9.0.0"20 edition= "2021"21-rust-version = "1.70.0"21+rust-version = "1.77.2"22 23 [badges.appveyor]24 repository = "sharkdp/fd"25 7 unmodified lines33 [build-dependencies]34 version_check = "0.9"35 36 [dependencies]37-aho-corasick = "1.0"38-nu-ansi-term = "0.49"37+aho-corasick = "1.1"38+nu-ansi-term = "0.50"39 argmax = "0.3.1"40-ignore = "0.4.21"41-regex = "1.9.6"40+ignore = "0.4.22"41+regex = "1.10.3"42 regex-syntax = "0.8"43 ctrlc = "3.2"44 humantime = "2.1"45 globset = "0.4"46 anyhow = "1.0"47 etcetera = "0.8"48 normpath = "1.1.1"49-crossbeam-channel = "0.5.10"50-clap_complete = {version = "4.4.6", optional = true}49+crossbeam-channel = "0.5.12"50+clap_complete = {version = "4.4.9", optional = true}51 faccess = "0.2.4"52 53 [dependencies.clap]54 version = "4.4.13"55 features = ["suggestions", "color", "wrap_help", "cargo", "derive"]56 57 [dependencies.chrono]58-version = "0.4.31"58+version = "0.4.34"59 default-features = false60 features = ["std", "clock"]61 62 [dependencies.lscolors]63-version = "0.16"63+version = "0.17"64 default-features = false65 features = ["nu-ansi-term"]66 67 [target.'cfg(unix)'.dependencies]9 unmodified lines77 jemallocator = {version = "0.5.4", optional = true}78 79 [dev-dependencies]80 diff = "0.1"81-tempfile = "3.9"81+tempfile = "3.10"82 filetime = "0.2"83 test-case = "3.3"84 85 [profile.release]9 unmodified linesmodified:CHANGELOG.md+5 added
1 unmodified line2 3 ## Features4 5 - Add `dir` as an alias to `directory` when using `-t` \ `--type`, see #1460 and #1464 (@Ato2207).6+- Add support for @%s date format in time filters similar to GNU date (seconds since Unix epoch for --older/--newer), see #1493 (@nabellows)7+- Breaking: No longer automatically ignore `.git` when using `--hidden` with vcs ignore enabled. This reverts the change in v9.0.0. While this feature8+ 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 add9+ a way to opt out of it. And you can easily get similar behavior by adding `.git/` to your global fdignore file.10+ See #1457.11 12 ## Bugfixes13 14 - Respect NO_COLOR environment variable with `--list-details` option. (#1455)740 unmodified linesmodified:Makefile+1 added-1 removed
4 unmodified lines5 datadir=$(prefix)/share6 exe_name=fd7 8 $(EXE): Cargo.toml src/**/*.rs9- cargo build --profile $(PROFILE)9+ cargo build --profile $(PROFILE) --locked10 11 .PHONY: completions12 completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/fd.ps1 autocomplete/_fd13 24 unmodified linesmodified:README.md+21 added-5 removed
8 unmodified lines9 It is a simple, fast and user-friendly alternative to [`find`](https://www.gnu.org/software/findutils/).10 While it does not aim to support all of `find`'s powerful functionality, it provides sensible11 (opinionated) defaults for a majority of use cases.12 13-Quick links:14-* [How to use](#how-to-use)15-* [Installation](#installation)16-* [Troubleshooting](#troubleshooting)13+[Installation](#installation) • [How to use](#how-to-use) • [Troubleshooting](#troubleshooting)14 15+## Sponsors16+17+A special *thank you* goes to our biggest <a href="doc/sponsors.md">sponsors</a>:18+19+<a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=fd&utm_source=fdgh">20+ <img src="doc/sponsors/terminal_trove_green.svg" width="200" alt="Terminal Trove">21+ <br>22+ <strong>The $HOME of all things in the terminal.</strong>23+</a>24+<br>25+<a href="https://terminaltrove.com/newsletter?utm_campaign=github&utm_medium=referral&utm_content=fd&utm_source=fdgh">26+ <sub>Find your next CLI / TUI tool and more at Terminal Trove,</sub>27+ <br>28+ <sup>Get updates on new tools on our newsletter.</sup>29+</a>30+31 ## Features32 33 * Intuitive syntax: `fd PATTERN` instead of `find -iname '*PATTERN*'`.34 * Regular expression (default) and glob-based patterns.246 unmodified lines281 If you want `fd` to ignore these patterns globally, you can put them in `fd`'s global ignore file.282 This is usually located in `~/.config/fd/ignore` in macOS or Linux, and `%APPDATA%\fd\ignore` in283 Windows.284 285+You may wish to include `.git/` in your `fd/ignore` file so that `.git` directories, and their contents286+are not included in output if you use the `--hidden` option.287+288 ### Deleting files289 290 You can use `fd` to remove all files and directories that are matched by your search pattern.291 If you only want to remove files, you can use the `--exec-batch`/`-X` option to call `rm`. For403 unmodified lines695 With Rust's package manager [cargo](https://github.com/rust-lang/cargo), you can install *fd* via:696 ```697 cargo install fd-find698 ```683-Note that rust version *1.70.0* or later is required.699+Note that rust version *1.77.2* or later is required.700 701 `make` is also needed for the build.702 703 Make sure to replace **sudo** with **doas** in commands depending on what you use.31 unmodified lines