diff -Nru rust-fd-find-8.0.0/Cargo.lock rust-fd-find-8.1.1/Cargo.lock --- rust-fd-find-8.0.0/Cargo.lock 2020-04-16 08:39:41.000000000 +0000 +++ rust-fd-find-8.1.1/Cargo.lock 2020-05-25 14:16:36.000000000 +0000 @@ -26,7 +26,17 @@ [[package]] name = "anyhow" -version = "1.0.28" +version = "1.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "arrayvec" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -34,8 +44,8 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -45,13 +55,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "bstr" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -59,7 +84,7 @@ [[package]] name = "cc" -version = "1.0.50" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -69,27 +94,23 @@ [[package]] name = "clap" -version = "2.33.0" +version = "2.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "term_size 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "crossbeam-channel" -version = "0.4.2" +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "crossbeam-utils" @@ -116,44 +137,66 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "dirs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dirs-sys" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "fd-find" -version = "8.0.0" +version = "8.1.1" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "anyhow 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", "ctrlc 3.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "diff 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ignore 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", + "ignore 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", "lscolors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "users 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "filetime" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -167,23 +210,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "globset" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", - "bstr 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hermit-abi" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -193,20 +246,19 @@ [[package]] name = "ignore" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -214,9 +266,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -225,16 +277,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -244,7 +287,7 @@ [[package]] name = "libc" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -264,11 +307,6 @@ ] [[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -279,9 +317,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -290,8 +328,8 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -300,7 +338,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -333,8 +371,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "redox_users" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "regex" -version = "1.3.6" +version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -357,11 +405,22 @@ ] [[package]] +name = "rust-argon2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -380,12 +439,11 @@ [[package]] name = "term_size" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -393,7 +451,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "term_size 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -411,8 +469,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "users" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "vec_map" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -432,12 +499,12 @@ dependencies = [ "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "winapi" -version = "0.2.8" +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -450,18 +517,13 @@ ] [[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -476,34 +538,39 @@ "checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -"checksum anyhow 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" +"checksum anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f" +"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bstr 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "2889e6d50f394968c8bf4240dc3f2a7eb4680844d27308f798229ac9d4725f41" -"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +"checksum bstr 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" +"checksum cc 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)" = "404b1fe4f65288577753b17e3b36a04596ee784493ec249bf81c7f2d2acd751c" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" +"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" +"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" "checksum ctrlc 3.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7a4ba686dff9fa4c1c9636ce1010b0cf98ceb421361b0bb3d6faeec43bd217a7" "checksum diff 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" -"checksum filetime 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f59efc38004c988e4201d11d263b8171f49a2e7ec0bdbb71773433f271504a5e" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" +"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" +"checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" +"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" "checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum globset 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120" -"checksum hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" +"checksum hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" "checksum humantime 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da" -"checksum ignore 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf60d063dbe6b75388eec66cfc07781167ae3d34a09e0c433e6c5de0511f7fb" +"checksum ignore 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "128b9e89d15a3faa642ee164c998fd4fae3d89d054463cddb2c25a7baad3a352" "checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" "checksum jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" +"checksum libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum lscolors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f77452267149eac960ded529fe5f5460ddf792845a1d71b5d0cfcee5642e47e" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" @@ -512,23 +579,25 @@ "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3" +"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +"checksum regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" "checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327" +"checksum term_size 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum users 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4227e95324a443c9fcb06e03d4d85e91aabe9a5a02aa818688b6918b6af486" +"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fa515c5163a99cc82bab70fd3bfdd36d827be85de63737b40fcef2ce084a436e" +"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff -Nru rust-fd-find-8.0.0/Cargo.toml rust-fd-find-8.1.1/Cargo.toml --- rust-fd-find-8.0.0/Cargo.toml 2020-04-16 08:39:41.000000000 +0000 +++ rust-fd-find-8.1.1/Cargo.toml 2020-05-25 14:16:36.000000000 +0000 @@ -13,7 +13,7 @@ [package] edition = "2018" name = "fd-find" -version = "8.0.0" +version = "8.1.1" authors = ["David Peter "] build = "build.rs" exclude = ["/benchmarks/*"] @@ -47,6 +47,9 @@ [dependencies.ctrlc] version = "3.1" +[dependencies.dirs] +version = "2.0" + [dependencies.globset] version = "0.4" @@ -83,10 +86,12 @@ [build-dependencies.version_check] version = "0.9" -[target."cfg(all(not(windows), not(target_env = \"musl\")))".dependencies.jemallocator] +[target."cfg(all(not(windows), not(target_os = \"macos\"), not(target_env = \"musl\")))".dependencies.jemallocator] version = "0.3.0" [target."cfg(all(unix, not(target_os = \"redox\")))".dependencies.libc] version = "0.2" +[target."cfg(unix)".dependencies.users] +version = "0.10.0" [badges.appveyor] repository = "sharkdp/fd" diff -Nru rust-fd-find-8.0.0/Cargo.toml.orig rust-fd-find-8.1.1/Cargo.toml.orig --- rust-fd-find-8.0.0/Cargo.toml.orig 2020-04-16 08:02:37.000000000 +0000 +++ rust-fd-find-8.1.1/Cargo.toml.orig 2020-05-25 13:37:13.000000000 +0000 @@ -16,7 +16,7 @@ name = "fd-find" readme = "README.md" repository = "https://github.com/sharkdp/fd" -version = "8.0.0" +version = "8.1.1" edition= "2018" [badges.appveyor] @@ -46,15 +46,22 @@ lscolors = "0.7" globset = "0.4" anyhow = "1.0" +dirs = "2.0" [dependencies.clap] version = "2.31.2" features = ["suggestions", "color", "wrap_help"] +[target.'cfg(unix)'.dependencies] +users = "0.10.0" + [target.'cfg(all(unix, not(target_os = "redox")))'.dependencies] libc = "0.2" -[target.'cfg(all(not(windows), not(target_env = "musl")))'.dependencies] +# FIXME: Re-enable jemalloc on macOS +# jemalloc is currently disabled on macOS due to a bug in jemalloc in combination with macOS +# Catalina. See https://github.com/sharkdp/fd/issues/498 for details. +[target.'cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))'.dependencies] jemallocator = "0.3.0" [dev-dependencies] diff -Nru rust-fd-find-8.0.0/.cargo_vcs_info.json rust-fd-find-8.1.1/.cargo_vcs_info.json --- rust-fd-find-8.0.0/.cargo_vcs_info.json 2020-04-16 08:39:41.000000000 +0000 +++ rust-fd-find-8.1.1/.cargo_vcs_info.json 2020-05-25 14:16:36.000000000 +0000 @@ -1,5 +1,5 @@ { "git": { - "sha1": "0335cc362b2c830c24b957504a7cb1f7cd623a44" + "sha1": "5648597a617adae62500c65320f377574a1325fd" } } diff -Nru rust-fd-find-8.0.0/CHANGELOG.md rust-fd-find-8.1.1/CHANGELOG.md --- rust-fd-find-8.0.0/CHANGELOG.md 2020-04-16 08:02:37.000000000 +0000 +++ rust-fd-find-8.1.1/CHANGELOG.md 2020-05-25 13:35:43.000000000 +0000 @@ -5,6 +5,31 @@ ## Changes ## Other +# v8.1.1 + +## Bugfixes + +- Support colored output on older Windows versions if either (1) `--color=always` is set or (2) the `TERM` environment variable is set. See #469 + +# v8.1.0 + +## Features + +- Add new `--owner [user][:group]` filter. See #307 (pull #581) (@alexmaco) +- Add support for a global ignore file (`~/.config/fd/ignore` on Unix), see #575 (@soedirgo) +- Do not exit immediately if one of the search paths is missing, see #587 (@DJRHails) + +## Bugfixes + +- Reverted a change from fd 8.0 that enabled colors on all Windows terminals (see below) in order to support older Windows versions again, see #577. Unfortunately, this re-opens #469 +- Fix segfault caused by jemalloc on macOS Catalina, see #498 +- Fix `--glob` behavior with empty pattern, see #579 (@SeamusConnor) +- Fix `--list-details` on FreeBSD, DragonFly BSD, OpenBSD and NetBSD. See #573 (@t6) + +## Changes + +- Updated documentation for `--size`, see #584 + # v8.0.0 ## Features diff -Nru rust-fd-find-8.0.0/debian/changelog rust-fd-find-8.1.1/debian/changelog --- rust-fd-find-8.0.0/debian/changelog 2020-05-06 11:22:34.000000000 +0000 +++ rust-fd-find-8.1.1/debian/changelog 2020-06-20 08:03:27.000000000 +0000 @@ -1,8 +1,8 @@ -rust-fd-find (8.0.0-1build1) groovy; urgency=high +rust-fd-find (8.1.1-1) unstable; urgency=medium - * No change rebuild to remove /usr/.crates2.json (LP: #1868517). + * Package fd-find 8.1.1 from crates.io using debcargo 2.4.3 - -- Julian Andres Klode Wed, 06 May 2020 13:22:34 +0200 + -- Sylvestre Ledru Sat, 20 Jun 2020 10:03:27 +0200 rust-fd-find (8.0.0-1) unstable; urgency=medium diff -Nru rust-fd-find-8.0.0/debian/control rust-fd-find-8.1.1/debian/control --- rust-fd-find-8.0.0/debian/control 2020-05-06 11:22:34.000000000 +0000 +++ rust-fd-find-8.1.1/debian/control 2020-06-20 08:03:27.000000000 +0000 @@ -14,6 +14,7 @@ librust-clap-2+suggestions-dev (>= 2.31.2-~~), librust-clap-2+wrap-help-dev (>= 2.31.2-~~), librust-ctrlc-3+default-dev (>= 3.1-~~), + librust-dirs-2+default-dev, librust-globset-0.4+default-dev, librust-humantime-2+default-dev, librust-ignore-0.4+default-dev (>= 0.4.3-~~), @@ -23,12 +24,12 @@ librust-num-cpus-1+default-dev (>= 1.8-~~), librust-regex-1+default-dev, librust-regex-syntax-0.6+default-dev, + librust-users-0.10+default-dev, librust-version-check-0.9+default-dev, dh-exec -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Rust Maintainers +Maintainer: Debian Rust Maintainers Uploaders: - Paride Legovini , + Paride Legovini , Sylvestre Ledru Standards-Version: 4.4.1 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/fd-find] diff -Nru rust-fd-find-8.0.0/debian/copyright.debcargo.hint rust-fd-find-8.1.1/debian/copyright.debcargo.hint --- rust-fd-find-8.0.0/debian/copyright.debcargo.hint 2020-04-20 15:46:16.000000000 +0000 +++ rust-fd-find-8.1.1/debian/copyright.debcargo.hint 2020-06-20 08:03:27.000000000 +0000 @@ -36,7 +36,7 @@ Files: debian/* Copyright: 2018-2020 Debian Rust Maintainers - 2018-2020 Paride Legovini + 2018-2020 Paride Legovini 2018-2020 Sylvestre Ledru License: MIT or Apache-2.0 diff -Nru rust-fd-find-8.0.0/debian/debcargo.toml rust-fd-find-8.1.1/debian/debcargo.toml --- rust-fd-find-8.0.0/debian/debcargo.toml 2020-04-20 15:46:16.000000000 +0000 +++ rust-fd-find-8.1.1/debian/debcargo.toml 2020-06-20 08:03:27.000000000 +0000 @@ -1,5 +1,5 @@ overlay = "." -uploaders = ["Paride Legovini ", "Sylvestre Ledru "] +uploaders = ["Paride Legovini ", "Sylvestre Ledru "] [source] section = "utils" diff -Nru rust-fd-find-8.0.0/debian/patches/disable-jemallocator.diff rust-fd-find-8.1.1/debian/patches/disable-jemallocator.diff --- rust-fd-find-8.0.0/debian/patches/disable-jemallocator.diff 2020-04-20 15:46:16.000000000 +0000 +++ rust-fd-find-8.1.1/debian/patches/disable-jemallocator.diff 2020-06-20 08:03:27.000000000 +0000 @@ -2,29 +2,31 @@ =================================================================== --- fd-find.orig/Cargo.toml +++ fd-find/Cargo.toml -@@ -83,8 +83,6 @@ version = "2.31.2" +@@ -86,8 +86,8 @@ version = "2.31.2" [build-dependencies.version_check] version = "0.9" --[target."cfg(all(not(windows), not(target_env = \"musl\")))".dependencies.jemallocator] +-[target."cfg(all(not(windows), not(target_os = \"macos\"), not(target_env = \"musl\")))".dependencies.jemallocator] -version = "0.3.0" ++#[target."cfg(all(not(windows), not(target_os = \"macos\"), not(target_env = \"musl\")))".dependencies.jemallocator] ++#version = "0.3.0" [target."cfg(all(unix, not(target_os = \"redox\")))".dependencies.libc] version = "0.2" - [badges.appveyor] + [target."cfg(unix)".dependencies.users] Index: fd-find/src/main.rs =================================================================== --- fd-find.orig/src/main.rs +++ fd-find/src/main.rs -@@ -30,9 +30,9 @@ use crate::options::Options; - use crate::regex_helper::pattern_has_uppercase_char; +@@ -34,9 +34,9 @@ use crate::regex_helper::pattern_has_upp // We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481 --#[cfg(all(not(windows), not(target_env = "musl")))] + // FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos +-#[cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))] -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; -+// #[cfg(all(not(windows), not(target_env = "musl")))] -+// #[global_allocator] -+// static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; ++//#[cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))] ++//#[global_allocator] ++//static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; fn run() -> Result { let matches = app::build_app().get_matches_from(env::args_os()); diff -Nru rust-fd-find-8.0.0/doc/fd.1 rust-fd-find-8.1.1/doc/fd.1 --- rust-fd-find-8.0.0/doc/fd.1 2020-04-16 08:02:15.000000000 +0000 +++ rust-fd-find-8.1.1/doc/fd.1 2020-05-25 13:07:42.000000000 +0000 @@ -33,10 +33,9 @@ .B \-I, \-\-no\-ignore Show search results from files and directories that would otherwise be ignored by .IR .gitignore , -.I .ignore -or -.I .fdignore -files. +.IR .ignore , +.IR .fdignore , +or the global ignore file. .TP .B \-u, \-\-unrestricted Alias for '--no-ignore'. Can be repeated; '-uu' is an alias for '--no-ignore --hidden'. @@ -186,7 +185,7 @@ .IP 'b' bytes .IP 'k' -kilobytes +kilobytes (base ten, 10^3 = 1000 bytes) .IP 'm' megabytes .IP 'g' @@ -194,7 +193,7 @@ .IP 't' terabytes .IP 'ki' -kibibytes +kibibytes (base two, 2^10 = 1024 bytes) .IP 'mi' mebibytes .IP 'gi' @@ -224,6 +223,15 @@ \-\-changed-before "2018-10-27 10:00:00" \-\-change-older-than 2weeks .TP +.BI "-o, \-\-owner " [user][:group] +Filter files by their user and/or group. Format: [(user|uid)][:(group|gid)]. Either side +is optional. Precede either side with a '!' to exclude files instead. + +Examples: + \-\-owner john + \-\-owner :students + \-\-owner "!john:students" +.TP .BI "\-x, \-\-exec " command Execute .I command @@ -273,6 +281,14 @@ .B LS_COLORS Determines how to colorize search results, see .BR dircolors (1) . +.TP +.B XDG_CONFIG_HOME, HOME +Used to locate the global ignore file. If +.B XDG_CONFIG_HOME +is set, use +.IR $XDG_CONFIG_HOME/fd/ignore . +Otherwise, use +.IR $HOME/.config/fd/ignore . .SH EXAMPLES .TP .RI "Find files and directories that match the pattern '" needle "':" diff -Nru rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/bug_report.md rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/bug_report.md --- rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/bug_report.md 1970-01-01 00:00:00.000000000 +0000 +++ rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/bug_report.md 2020-05-25 13:07:42.000000000 +0000 @@ -0,0 +1,23 @@ +--- +name: Bug Report +about: Report a bug. +title: "" +labels: bug +assignees: '' + +--- + +**Describe the bug you encountered:** + + +**Describe what you expected to happen:** + + +**What version of `fd` are you using?** + + +**Which operating system / distribution are you on?** + diff -Nru rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/config.yml rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/config.yml --- rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/config.yml 1970-01-01 00:00:00.000000000 +0000 +++ rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/config.yml 2020-05-25 13:07:42.000000000 +0000 @@ -0,0 +1,2 @@ +blank_issues_enabled: true + diff -Nru rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/feature_request.md rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/feature_request.md --- rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/feature_request.md 1970-01-01 00:00:00.000000000 +0000 +++ rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/feature_request.md 2020-05-25 13:07:42.000000000 +0000 @@ -0,0 +1,10 @@ +--- +name: Feature Request +about: Suggest an idea for this project. +title: '' +labels: feature-request +assignees: '' + +--- + + diff -Nru rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/question.md rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/question.md --- rust-fd-find-8.0.0/.github/ISSUE_TEMPLATE/question.md 1970-01-01 00:00:00.000000000 +0000 +++ rust-fd-find-8.1.1/.github/ISSUE_TEMPLATE/question.md 2020-05-25 13:07:42.000000000 +0000 @@ -0,0 +1,13 @@ +--- +name: Question +about: Ask a question about 'fd'. +title: '' +labels: question +assignees: '' + +--- + + + +**What version of `fd` are you using?** +[paste the output of `fd --version` here] diff -Nru rust-fd-find-8.0.0/README.md rust-fd-find-8.1.1/README.md --- rust-fd-find-8.0.0/README.md 2020-04-16 08:02:37.000000000 +0000 +++ rust-fd-find-8.1.1/README.md 2020-05-25 13:07:42.000000000 +0000 @@ -130,6 +130,8 @@ ## Installation +[![Packaging status](https://repology.org/badge/vertical-allrepos/fd-find.svg)](https://repology.org/project/fd-find/versions) + ### On Ubuntu *... and other Debian-based Linux distributions.* @@ -145,7 +147,7 @@ If you use an older version of Ubuntu, you can download the latest `.deb` package from the [release page](https://github.com/sharkdp/fd/releases) and install it via: ``` bash -sudo dpkg -i fd_8.0.0_amd64.deb # adapt version number and architecture +sudo dpkg -i fd_8.1.0_amd64.deb # adapt version number and architecture ``` ### On Debian @@ -451,6 +453,10 @@ ``` Note: `fd` also supports `.ignore` files that are used by other programs such as `rg` or `ag`. +If you want `fd` to ignore these patterns globally, you can put them in `fd`'s global ignore file. +This is usually located in `~/.config/fd/ignore` in macOS or Linux, and `%APPDATA%\fd\ignore` in +Windows. + ### Using fd with `xargs` or `parallel` If we want to run a command on all search results, we can pipe the output to `xargs`: @@ -547,6 +553,29 @@ In emacs, run `M-x find-file-in-project-by-selected` to find matching files. Alternatively, run `M-x find-file-in-project` to list all available files in the project. +#### Printing fd's output as a tree + +To format the output of `fd` similar to the `tree` command, install [`as-tree`] and pipe the output +of `fd` to `as-tree`: +```bash +fd | as-tree +``` + +This can be more useful than running `tree` by itself because `tree` does not ignore any files by +default, nor does it support as rich a set of options as `fd` does to control what to print: +```bash +❯ fd --extension rs | as-tree +. +├── build.rs +└── src + ├── app.rs + └── error.rs +``` + +For more information about `as-tree`, see [the `as-tree` README][`as-tree`]. + +[`as-tree`]: https://github.com/jez/as-tree + ## License Copyright (c) 2017-2020 The fd developers diff -Nru rust-fd-find-8.0.0/src/app.rs rust-fd-find-8.1.1/src/app.rs --- rust-fd-find-8.0.0/src/app.rs 2020-04-16 08:10:53.000000000 +0000 +++ rust-fd-find-8.1.1/src/app.rs 2020-05-25 13:07:42.000000000 +0000 @@ -30,7 +30,7 @@ .help("Do not respect .(git|fd)ignore files") .long_help( "Show search results from files and directories that would otherwise be \ - ignored by '.gitignore', '.ignore' or '.fdignore' files.", + ignored by '.gitignore', '.ignore', '.fdignore', or the global ignore file.", ), ) .arg( @@ -44,6 +44,12 @@ ), ) .arg( + Arg::with_name("no-global-ignore-file") + .long("no-global-ignore-file") + .hidden(true) + .long_help("Do not respect the global ignore file."), + ) + .arg( Arg::with_name("rg-alias-hidden-ignore") .short("u") .long("unrestricted") @@ -380,15 +386,15 @@ '-': file size must be less than or equal to this\n \ 'NUM': The numeric size (e.g. 500)\n \ 'UNIT': The units for NUM. They are not case-sensitive.\n\ - Allowed unit values:\n \ - 'b': bytes\n \ - 'k': kilobytes\n \ - 'm': megabytes\n \ - 'g': gigabytes\n \ - 't': terabytes\n \ - 'ki': kibibytes\n \ - 'mi': mebibytes\n \ - 'gi': gibibytes\n \ + Allowed unit values:\n \ + 'b': bytes\n \ + 'k': kilobytes (base ten, 10^3 = 1000 bytes)\n \ + 'm': megabytes\n \ + 'g': gigabytes\n \ + 't': terabytes\n \ + 'ki': kibibytes (base two, 2^10 = 1024 bytes)\n \ + 'mi': mebibytes\n \ + 'gi': gibibytes\n \ 'ti': tebibytes", ), ) @@ -524,6 +530,26 @@ ), ); + if cfg!(unix) { + app = app.arg( + Arg::with_name("owner") + .long("owner") + .short("o") + .takes_value(true) + .value_name("user:group") + .help("Filter by owning user and/or group") + .long_help( + "Filter files by their user and/or group. \ + Format: [(user|uid)][:(group|gid)]. Either side is optional. \ + Precede either side with a '!' to exclude files instead.\n\ + Examples:\n \ + --owner john\n \ + --owner :students\n \ + --owner '!john:students'", + ), + ); + } + // Make `--one-file-system` available only on Unix and Windows platforms, as per the // restrictions on the corresponding option in the `ignore` crate. // Provide aliases `mount` and `xdev` for people coming from `find`. diff -Nru rust-fd-find-8.0.0/src/exec/input.rs rust-fd-find-8.1.1/src/exec/input.rs --- rust-fd-find-8.0.0/src/exec/input.rs 2020-04-07 06:01:51.000000000 +0000 +++ rust-fd-find-8.1.1/src/exec/input.rs 2020-05-25 13:07:42.000000000 +0000 @@ -5,13 +5,13 @@ /// Removes the parent component of the path pub fn basename(path: &Path) -> &OsStr { - path.file_name().unwrap_or(path.as_os_str()) + path.file_name().unwrap_or_else(|| path.as_os_str()) } /// Removes the extension from the path pub fn remove_extension(path: &Path) -> OsString { let dirname = dirname(path); - let stem = path.file_stem().unwrap_or(path.as_os_str()); + let stem = path.file_stem().unwrap_or_else(|| path.as_os_str()); let path = PathBuf::from(dirname).join(stem); @@ -28,7 +28,7 @@ p.as_os_str().to_owned() } }) - .unwrap_or(path.as_os_str().to_owned()) + .unwrap_or_else(|| path.as_os_str().to_owned()) } #[cfg(test)] diff -Nru rust-fd-find-8.0.0/src/exec/mod.rs rust-fd-find-8.1.1/src/exec/mod.rs --- rust-fd-find-8.0.0/src/exec/mod.rs 2020-04-04 16:46:17.000000000 +0000 +++ rust-fd-find-8.1.1/src/exec/mod.rs 2020-05-25 13:07:42.000000000 +0000 @@ -201,7 +201,7 @@ } } - pub fn generate<'a>(&'a self, path: impl AsRef) -> OsString { + pub fn generate(&self, path: impl AsRef) -> OsString { use self::Token::*; match *self { diff -Nru rust-fd-find-8.0.0/src/filter/mod.rs rust-fd-find-8.1.1/src/filter/mod.rs --- rust-fd-find-8.0.0/src/filter/mod.rs 2020-04-03 20:46:34.000000000 +0000 +++ rust-fd-find-8.1.1/src/filter/mod.rs 2020-05-25 13:07:42.000000000 +0000 @@ -1,5 +1,11 @@ pub use self::size::SizeFilter; pub use self::time::TimeFilter; +#[cfg(unix)] +pub use self::owner::OwnerFilter; + mod size; mod time; + +#[cfg(unix)] +mod owner; diff -Nru rust-fd-find-8.0.0/src/filter/owner.rs rust-fd-find-8.1.1/src/filter/owner.rs --- rust-fd-find-8.0.0/src/filter/owner.rs 1970-01-01 00:00:00.000000000 +0000 +++ rust-fd-find-8.1.1/src/filter/owner.rs 2020-05-25 13:07:42.000000000 +0000 @@ -0,0 +1,123 @@ +use anyhow::{anyhow, Result}; +use std::fs; + +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct OwnerFilter { + uid: Check, + gid: Check, +} + +#[derive(Clone, Copy, Debug, PartialEq)] +enum Check { + Equal(T), + NotEq(T), + Ignore, +} + +impl OwnerFilter { + /// Parses an owner constraint + /// Returns an error if the string is invalid + /// Returns Ok(None) when string is acceptable but a noop (such as "" or ":") + pub fn from_string(input: &str) -> Result> { + let mut it = input.split(':'); + let (fst, snd) = (it.next(), it.next()); + + if it.next().is_some() { + return Err(anyhow!( + "more than one ':' present in owner string '{}'. See 'fd --help'.", + input + )); + } + + let uid = Check::parse(fst, |s| { + s.parse() + .ok() + .or_else(|| users::get_user_by_name(s).map(|user| user.uid())) + .ok_or_else(|| anyhow!("'{}' is not a recognized user name", s)) + })?; + let gid = Check::parse(snd, |s| { + s.parse() + .ok() + .or_else(|| users::get_group_by_name(s).map(|group| group.gid())) + .ok_or_else(|| anyhow!("'{}' is not a recognized group name", s)) + })?; + + if let (Check::Ignore, Check::Ignore) = (uid, gid) { + Ok(None) + } else { + Ok(Some(OwnerFilter { uid, gid })) + } + } + + pub fn matches(&self, md: &fs::Metadata) -> bool { + use std::os::unix::fs::MetadataExt; + + self.uid.check(md.uid()) && self.gid.check(md.gid()) + } +} + +impl Check { + fn check(&self, v: T) -> bool { + match self { + Check::Equal(x) => v == *x, + Check::NotEq(x) => v != *x, + Check::Ignore => true, + } + } + + fn parse(s: Option<&str>, f: F) -> Result + where + F: Fn(&str) -> Result, + { + let (s, equality) = match s { + Some("") | None => return Ok(Check::Ignore), + Some(s) if s.starts_with('!') => (&s[1..], false), + Some(s) => (s, true), + }; + + f(s).map(|x| { + if equality { + Check::Equal(x) + } else { + Check::NotEq(x) + } + }) + } +} + +#[cfg(test)] +mod owner_parsing { + use super::OwnerFilter; + + macro_rules! owner_tests { + ($($name:ident: $value:expr => $result:pat,)*) => { + $( + #[test] + fn $name() { + let o = OwnerFilter::from_string($value); + match o { + $result => {}, + _ => panic!("{:?} does not match {}", o, stringify!($result)), + } + } + )* + }; + } + + use super::Check::*; + owner_tests! { + empty: "" => Ok(None), + uid_only: "5" => Ok(Some(OwnerFilter { uid: Equal(5), gid: Ignore })), + uid_gid: "9:3" => Ok(Some(OwnerFilter { uid: Equal(9), gid: Equal(3) })), + gid_only: ":8" => Ok(Some(OwnerFilter { uid: Ignore, gid: Equal(8) })), + colon_only: ":" => Ok(None), + trailing: "5:" => Ok(Some(OwnerFilter { uid: Equal(5), gid: Ignore })), + + uid_negate: "!5" => Ok(Some(OwnerFilter { uid: NotEq(5), gid: Ignore })), + both_negate:"!4:!3" => Ok(Some(OwnerFilter { uid: NotEq(4), gid: NotEq(3) })), + uid_not_gid:"6:!8" => Ok(Some(OwnerFilter { uid: Equal(6), gid: NotEq(8) })), + + more_colons:"3:5:" => Err(_), + only_colons:"::" => Err(_), + } +} diff -Nru rust-fd-find-8.0.0/src/filter/size.rs rust-fd-find-8.1.1/src/filter/size.rs --- rust-fd-find-8.0.0/src/filter/size.rs 2020-04-03 20:46:34.000000000 +0000 +++ rust-fd-find-8.1.1/src/filter/size.rs 2020-05-25 13:07:42.000000000 +0000 @@ -2,7 +2,7 @@ use regex::Regex; lazy_static! { - static ref SIZE_CAPTURES: Regex = { Regex::new(r"(?i)^([+-])(\d+)(b|[kmgt]i?b?)$").unwrap() }; + static ref SIZE_CAPTURES: Regex = Regex::new(r"(?i)^([+-])(\d+)(b|[kmgt]i?b?)$").unwrap(); } #[derive(Clone, Copy, Debug, PartialEq)] diff -Nru rust-fd-find-8.0.0/src/main.rs rust-fd-find-8.1.1/src/main.rs --- rust-fd-find-8.0.0/src/main.rs 2020-04-16 08:02:15.000000000 +0000 +++ rust-fd-find-8.1.1/src/main.rs 2020-05-25 13:07:42.000000000 +0000 @@ -22,15 +22,19 @@ use lscolors::LsColors; use regex::bytes::{RegexBuilder, RegexSetBuilder}; +use crate::error::print_error; use crate::exec::CommandTemplate; use crate::exit_codes::ExitCode; use crate::filetypes::FileTypes; +#[cfg(unix)] +use crate::filter::OwnerFilter; use crate::filter::{SizeFilter, TimeFilter}; use crate::options::Options; use crate::regex_helper::pattern_has_uppercase_char; // We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481 -#[cfg(all(not(windows), not(target_env = "musl")))] +// FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos +#[cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))] #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; @@ -65,36 +69,43 @@ let pattern = matches .value_of_os("pattern") .map(|p| { - p.to_str().ok_or(anyhow!( - "The search pattern includes invalid UTF-8 sequences." - )) + p.to_str() + .ok_or_else(|| anyhow!("The search pattern includes invalid UTF-8 sequences.")) }) .transpose()? .unwrap_or(""); // Get one or more root directories to search. - let mut dir_vec: Vec<_> = match matches + let passed_arguments = matches .values_of_os("path") - .or_else(|| matches.values_of_os("search-path")) - { - Some(paths) => paths - .map(|path| { - let path_buffer = PathBuf::from(path); - if filesystem::is_dir(&path_buffer) { - Ok(path_buffer) - } else { - Err(anyhow!( - "Search path '{}' is not a directory.", - path_buffer.to_string_lossy() - )) - } - }) - .collect::>>()?, - None => vec![current_directory.to_path_buf()], + .or_else(|| matches.values_of_os("search-path")); + + let mut search_paths = if let Some(paths) = passed_arguments { + let mut directories = vec![]; + for path in paths { + let path_buffer = PathBuf::from(path); + if filesystem::is_dir(&path_buffer) { + directories.push(path_buffer); + } else { + print_error(format!( + "Search path '{}' is not a directory.", + path_buffer.to_string_lossy() + )); + } + } + + directories + } else { + vec![current_directory.to_path_buf()] }; + // Check if we have no valid search paths. + if search_paths.is_empty() { + return Err(anyhow!("No valid search paths given.")); + } + if matches.is_present("absolute-path") { - dir_vec = dir_vec + search_paths = search_paths .iter() .map(|path_buffer| { path_buffer @@ -122,7 +133,7 @@ )); } - let pattern_regex = if matches.is_present("glob") { + let pattern_regex = if matches.is_present("glob") && !pattern.is_empty() { let glob = GlobBuilder::new(pattern).literal_separator(true).build()?; glob.regex().to_owned() } else if matches.is_present("fixed-strings") { @@ -137,18 +148,22 @@ let case_sensitive = !matches.is_present("ignore-case") && (matches.is_present("case-sensitive") || pattern_has_uppercase_char(&pattern_regex)); + #[cfg(windows)] + let ansi_colors_support = + ansi_term::enable_ansi_support().is_ok() || std::env::var_os("TERM").is_some(); + + #[cfg(not(windows))] + let ansi_colors_support = true; + let interactive_terminal = atty::is(Stream::Stdout); let colored_output = match matches.value_of("color") { Some("always") => true, Some("never") => false, - _ => env::var_os("NO_COLOR").is_none() && interactive_terminal, + _ => ansi_colors_support && env::var_os("NO_COLOR").is_none() && interactive_terminal, }; let path_separator = matches.value_of("path-separator").map(|str| str.to_owned()); - #[cfg(windows)] - ansi_term::enable_ansi_support().ok(); - let ls_colors = if colored_output { Some(LsColors::from_env().unwrap_or_default()) } else { @@ -175,11 +190,17 @@ }; let cmd: Vec<&str> = if cfg!(unix) { - if !cfg!(target_os = "macos") { - // Non-MacOS Unix + if !cfg!(any( + target_os = "macos", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd" + )) { + // Assume ls is GNU ls gnu_ls("ls") } else { - // MacOS + // MacOS, DragonFlyBSD, FreeBSD use std::process::{Command, Stdio}; // Use GNU ls, if available (support for --color=auto, better LS_COLORS support) @@ -194,13 +215,14 @@ gnu_ls("gls") } else { let mut cmd = vec![ - "ls", // MacOS version of ls + "ls", // BSD version of ls "-l", // long listing format - "-h", // '--human-readable' is not available on MacOS, '-h' is + "-h", // '--human-readable' is not available, '-h' is "-d", // '--directory' is not available, but '-d' is ]; - if colored_output { + if !cfg!(any(target_os = "netbsd", target_os = "openbsd")) && colored_output { + // -G is not available in NetBSD's and OpenBSD's ls cmd.push("-G"); } @@ -238,10 +260,8 @@ let size_limits = if let Some(vs) = matches.values_of("size") { vs.map(|sf| { - SizeFilter::from_string(sf).ok_or(anyhow!( - "'{}' is not a valid size constraint. See 'fd --help'.", - sf - )) + SizeFilter::from_string(sf) + .ok_or_else(|| anyhow!("'{}' is not a valid size constraint. See 'fd --help'.", sf)) }) .collect::>>()? } else { @@ -271,6 +291,13 @@ } } + #[cfg(unix)] + let owner_constraint = if let Some(s) = matches.value_of("owner") { + OwnerFilter::from_string(s)? + } else { + None + }; + let config = Options { case_sensitive, search_full_path: matches.is_present("full-path"), @@ -281,6 +308,9 @@ read_vcsignore: !(matches.is_present("no-ignore") || matches.is_present("rg-alias-hidden-ignore") || matches.is_present("no-ignore-vcs")), + read_global_ignore: !(matches.is_present("no-ignore") + || matches.is_present("rg-alias-hidden-ignore") + || matches.is_present("no-global-ignore-file")), follow_links: matches.is_present("follow"), one_file_system: matches.is_present("one-file-system"), null_separator: matches.is_present("null_separator"), @@ -354,6 +384,8 @@ .unwrap_or_else(|| vec![]), size_constraints: size_limits, time_constraints, + #[cfg(unix)] + owner_constraint, show_filesystem_errors: matches.is_present("show-errors"), path_separator, max_results: matches @@ -382,7 +414,7 @@ ) })?; - walk::scan(&dir_vec, Arc::new(re), Arc::new(config)) + walk::scan(&search_paths, Arc::new(re), Arc::new(config)) } fn main() { diff -Nru rust-fd-find-8.0.0/src/options.rs rust-fd-find-8.1.1/src/options.rs --- rust-fd-find-8.0.0/src/options.rs 2020-04-15 15:34:06.000000000 +0000 +++ rust-fd-find-8.1.1/src/options.rs 2020-05-25 13:07:42.000000000 +0000 @@ -5,6 +5,8 @@ use crate::exec::CommandTemplate; use crate::filetypes::FileTypes; +#[cfg(unix)] +use crate::filter::OwnerFilter; use crate::filter::{SizeFilter, TimeFilter}; /// Configuration options for *fd*. @@ -25,6 +27,9 @@ /// Whether to respect VCS ignore files (`.gitignore`, ..) or not. pub read_vcsignore: bool, + /// Whether to respect the global ignore file or not. + pub read_global_ignore: bool, + /// Whether to follow symlinks or not. pub follow_links: bool, @@ -82,6 +87,10 @@ /// Constraints on last modification time of files pub time_constraints: Vec, + #[cfg(unix)] + /// User/group ownership constraint + pub owner_constraint: Option, + /// Whether or not to display filesystem errors pub show_filesystem_errors: bool, diff -Nru rust-fd-find-8.0.0/src/output.rs rust-fd-find-8.1.1/src/output.rs --- rust-fd-find-8.0.0/src/output.rs 2020-04-04 16:46:17.000000000 +0000 +++ rust-fd-find-8.1.1/src/output.rs 2020-05-25 13:07:42.000000000 +0000 @@ -11,7 +11,7 @@ use crate::filesystem::strip_current_dir; use crate::options::Options; -pub fn replace_path_separator<'a>(path: &str, new_path_separator: &str) -> String { +pub fn replace_path_separator(path: &str, new_path_separator: &str) -> String { path.replace(std::path::MAIN_SEPARATOR, &new_path_separator) } diff -Nru rust-fd-find-8.0.0/src/walk.rs rust-fd-find-8.1.1/src/walk.rs --- rust-fd-find-8.0.0/src/walk.rs 2020-04-16 08:02:15.000000000 +0000 +++ rust-fd-find-8.1.1/src/walk.rs 2020-05-25 13:07:42.000000000 +0000 @@ -82,6 +82,34 @@ walker.add_custom_ignore_filename(".fdignore"); } + if config.read_global_ignore { + #[cfg(target_os = "macos")] + let config_dir_op = std::env::var_os("XDG_CONFIG_HOME") + .map(PathBuf::from) + .filter(|p| p.is_absolute()) + .or_else(|| dirs::home_dir().map(|d| d.join(".config"))); + + #[cfg(not(target_os = "macos"))] + let config_dir_op = dirs::config_dir(); + + if let Some(global_ignore_file) = config_dir_op + .map(|p| p.join("fd").join("ignore")) + .filter(|p| p.is_file()) + { + let result = walker.add_ignore(global_ignore_file); + match result { + Some(ignore::Error::Partial(_)) => (), + Some(err) => { + print_error(format!( + "Malformed pattern in global ignore file. {}.", + err.to_string() + )); + } + None => (), + } + } + } + for ignore_file in &config.ignore_files { let result = walker.add_ignore(ignore_file); match result { @@ -411,6 +439,19 @@ } } + #[cfg(unix)] + { + if let Some(ref owner_constraint) = config.owner_constraint { + if let Ok(ref metadata) = entry_path.metadata() { + if !owner_constraint.matches(&metadata) { + return ignore::WalkState::Continue; + } + } else { + return ignore::WalkState::Continue; + } + } + } + // Filter out unwanted sizes if it is a file and we have been given size constraints. if !config.size_constraints.is_empty() { if entry_path.is_file() { diff -Nru rust-fd-find-8.0.0/tests/testenv/mod.rs rust-fd-find-8.1.1/tests/testenv/mod.rs --- rust-fd-find-8.0.0/tests/testenv/mod.rs 2020-04-04 16:46:17.000000000 +0000 +++ rust-fd-find-8.1.1/tests/testenv/mod.rs 2020-05-25 13:07:42.000000000 +0000 @@ -190,7 +190,7 @@ // Setup *fd* command. let mut cmd = process::Command::new(&self.fd_exe); cmd.current_dir(self.temp_dir.path().join(path)); - cmd.args(args); + cmd.arg("--no-global-ignore-file").args(args); // Run *fd*. let output = cmd.output().expect("fd output"); @@ -240,31 +240,49 @@ } } + /// Assert that calling *fd* with the specified arguments produces the expected error, + /// and does not succeed. + pub fn assert_failure_with_error(&self, args: &[&str], expected: &str) { + let status = self.assert_error_subdirectory(".", args, expected); + if status.success() { + panic!("error '{}' did not occur.", expected); + } + } + /// Assert that calling *fd* with the specified arguments produces the expected error. - pub fn assert_error(&self, args: &[&str], expected: &str) { + pub fn assert_error(&self, args: &[&str], expected: &str) -> process::ExitStatus { self.assert_error_subdirectory(".", args, expected) } /// Assert that calling *fd* in the specified path under the root working directory, /// and with the specified arguments produces an error with the expected message. - fn assert_error_subdirectory>(&self, path: P, args: &[&str], expected: &str) { + fn assert_error_subdirectory>( + &self, + path: P, + args: &[&str], + expected: &str, + ) -> process::ExitStatus { // Setup *fd* command. let mut cmd = process::Command::new(&self.fd_exe); cmd.current_dir(self.temp_dir.path().join(path)); - cmd.args(args); + cmd.arg("--no-global-ignore-file").args(args); // Run *fd*. let output = cmd.output().expect("fd output"); - // Check for exit status. - if output.status.success() { - panic!("error '{}' did not occur.", expected); - } + // Normalize both expected and actual output. + let expected_error = normalize_output(expected, true, self.normalize_line); + let actual_err = normalize_output( + &String::from_utf8_lossy(&output.stderr), + false, + self.normalize_line, + ); // Compare actual output to expected output. - let actual = String::from_utf8_lossy(&output.stderr); - if !actual.starts_with(expected) { - panic!(format_output_error(args, &expected, &actual)); + if !actual_err.trim_start().starts_with(&expected_error) { + panic!(format_output_error(args, &expected_error, &actual_err)); } + + return output.status; } } diff -Nru rust-fd-find-8.0.0/tests/tests.rs rust-fd-find-8.1.1/tests/tests.rs --- rust-fd-find-8.0.0/tests/tests.rs 2020-04-16 07:38:06.000000000 +0000 +++ rust-fd-find-8.1.1/tests/tests.rs 2020-05-25 13:07:42.000000000 +0000 @@ -9,9 +9,9 @@ use crate::testenv::TestEnv; -static DEFAULT_DIRS: &'static [&'static str] = &["one/two/three", "one/two/three/directory_foo"]; +static DEFAULT_DIRS: &[&str] = &["one/two/three", "one/two/three/directory_foo"]; -static DEFAULT_FILES: &'static [&'static str] = &[ +static DEFAULT_FILES: &[&str] = &[ "a.foo", "one/b.foo", "one/two/c.foo", @@ -52,7 +52,7 @@ f.write_all(content.as_bytes()).unwrap(); } -/// Simple tests +/// Simple test #[test] fn test_simple() { let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES); @@ -70,21 +70,27 @@ one/two/three/d.foo one/two/three/directory_foo", ); +} - te.assert_output( - &[], - "a.foo - e1 e2 - one - one/b.foo - one/two - one/two/c.foo - one/two/C.Foo2 - one/two/three - one/two/three/d.foo - one/two/three/directory_foo - symlink", - ); +/// Test each pattern type with an empty pattern. +#[test] +fn test_empty_pattern() { + let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES); + let expected = "a.foo + e1 e2 + one + one/b.foo + one/two + one/two/c.foo + one/two/C.Foo2 + one/two/three + one/two/three/d.foo + one/two/three/directory_foo + symlink"; + + te.assert_output(&["--regex"], expected); + te.assert_output(&["--fixed-strings"], expected); + te.assert_output(&["--glob"], expected); } /// Test multiple directory searches @@ -111,6 +117,45 @@ te.assert_output(&["b.foo", "test1", "test2"], "test1/b.foo"); } +/// Test search over multiple directory with missing +#[test] +fn test_multi_file_with_missing() { + let dirs = &["real"]; + let files = &["real/a.foo", "real/b.foo"]; + let te = TestEnv::new(dirs, files); + te.assert_output(&["a.foo", "real", "fake"], "real/a.foo"); + + te.assert_error( + &["a.foo", "real", "fake"], + "[fd error]: Search path 'fake' is not a directory.", + ); + + te.assert_output( + &["", "real", "fake"], + "real/a.foo + real/b.foo", + ); + + te.assert_output( + &["", "real", "fake1", "fake2"], + "real/a.foo + real/b.foo", + ); + + te.assert_error( + &["", "real", "fake1", "fake2"], + "[fd error]: Search path 'fake1' is not a directory. + [fd error]: Search path 'fake2' is not a directory.", + ); + + te.assert_failure_with_error( + &["", "fake1", "fake2"], + "[fd error]: Search path 'fake1' is not a directory. + [fd error]: Search path 'fake2' is not a directory. + [fd error]: No valid search paths given.", + ); +} + /// Explicit root path #[test] fn test_explicit_root_path() { @@ -1208,22 +1253,22 @@ "", ); - te.assert_error( + te.assert_failure_with_error( &["foo", "--exec-batch", "echo", "{}", "{}"], "[fd error]: Only one placeholder allowed for batch commands", ); - te.assert_error( + te.assert_failure_with_error( &["foo", "--exec-batch", "echo", "{/}", ";", "-x", "echo"], "error: The argument '--exec ' cannot be used with '--exec-batch '", ); - te.assert_error( + te.assert_failure_with_error( &["foo", "--exec-batch"], "error: The argument '--exec-batch ' requires a value but none was supplied", ); - te.assert_error( + te.assert_failure_with_error( &["foo", "--exec-batch", "echo {}"], "[fd error]: First argument of exec-batch is expected to be a fixed executable", ); diff -Nru rust-fd-find-8.0.0/.travis.yml rust-fd-find-8.1.1/.travis.yml --- rust-fd-find-8.0.0/.travis.yml 2020-04-03 08:25:34.000000000 +0000 +++ rust-fd-find-8.1.1/.travis.yml 2020-05-25 13:07:42.000000000 +0000 @@ -1,5 +1,4 @@ language: rust -cache: cargo matrix: include: # Stable channel. @@ -16,6 +15,7 @@ rust: stable env: TARGET=i686-unknown-linux-musl - os: osx + osx_image: xcode11.4 # Catalina rust: stable env: TARGET=x86_64-apple-darwin - os: linux