diff --git a/Cargo.lock b/Cargo.lock index 5b9e337..b51b1ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,47 +19,48 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -67,24 +68,18 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.76" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -97,24 +92,19 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -125,9 +115,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.11" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -135,9 +125,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.11" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -147,11 +137,11 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn", @@ -159,47 +149,40 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.16" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", ] [[package]] name = "crossbeam-utils" -version = "0.8.17" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "diff" @@ -230,16 +213,26 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", +] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ + "env_filter", "humantime", "log", ] @@ -252,9 +245,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -262,9 +255,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "form_urlencoded" @@ -277,9 +270,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -296,6 +289,7 @@ dependencies = [ "env_logger", "libgfold", "log", + "remain", "serde", "serde_json", "termcolor", @@ -311,11 +305,11 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" -version = "0.18.1" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ - "bitflags 2.4.1", + "bitflags", "libc", "libgit2-sys", "log", @@ -324,9 +318,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -334,6 +328,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "humantime" version = "2.1.0" @@ -352,34 +352,40 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] [[package]] name = "libc" -version = "0.2.151" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgfold" @@ -391,6 +397,7 @@ dependencies = [ "log", "pretty_assertions", "rayon", + "remain", "serde", "tempfile", "thiserror", @@ -398,9 +405,9 @@ dependencies = [ [[package]] name = "libgit2-sys" -version = "0.16.1+1.7.1" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ "cc", "libc", @@ -410,20 +417,19 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.1", + "bitflags", "libc", - "redox_syscall", ] [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "libc", @@ -433,49 +439,46 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + [[package]] name = "option-ext" version = "0.2.0" @@ -490,9 +493,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "pretty_assertions" @@ -506,27 +509,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -534,47 +537,49 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "redox_users" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "bitflags 1.3.2", + "getrandom", + "libredox", + "thiserror", ] [[package]] -name = "redox_users" -version = "0.4.4" +name = "remain" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "46aef80f842736de545ada6ec65b81ee91504efd6853f4b96de7414c42ae7443" dependencies = [ - "getrandom", - "libredox", - "thiserror", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.1", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -583,30 +588,30 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -615,9 +620,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -626,35 +631,35 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -663,9 +668,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.42" +version = "2.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" +checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" dependencies = [ "proc-macro2", "quote", @@ -674,40 +679,39 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.51" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.51" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", @@ -731,9 +735,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.8.8" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", @@ -743,18 +747,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", @@ -765,9 +769,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -777,9 +781,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -813,37 +817,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.48.0" @@ -859,7 +841,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -879,17 +861,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -900,9 +883,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -912,9 +895,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -924,9 +907,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -936,9 +925,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -948,9 +937,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -960,9 +949,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -972,15 +961,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.30" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" dependencies = [ "memchr", ] @@ -991,6 +980,7 @@ version = "0.1.0" dependencies = [ "clap", "dirs", + "remain", "strum", "termcolor", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 3496c22..3ac80d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,13 @@ members = ["bin/gfold", "bin/xtask", "lib/libgfold"] default-members = ["bin/gfold"] resolver = "2" +[workspace.package] +authors = ["Nick Gerace "] +edition = "2021" +homepage = "https://github.com/nickgerace/gfold" +license = "Apache-2.0" +repository = "https://github.com/nickgerace/gfold" + [profile.release.package.gfold] codegen-units = 1 opt-level = 3 @@ -14,17 +21,18 @@ panic = "abort" [workspace.dependencies] anyhow = { version = "1.0", features = ["backtrace"] } -clap = { version = "4.4", features = ["derive"] } +clap = { version = "4.5", features = ["derive"] } dirs = "5.0" -env_logger = { version = "0.10", features = ["humantime"], default_features = false } +env_logger = { version = "0.11", features = ["humantime"], default_features = false } git2 = { version = "0.18", default_features = false } log = "0.4" pretty_assertions = "1.4" -rayon = "1.8" +rayon = "1.10" +remain = "0.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -strum = { version = "0.25", features = ["derive"] } -tempfile = "3.8" +strum = { version = "0.26", features = ["derive"] } +tempfile = "3.10" termcolor = "1.4" thiserror = "1.0" toml = "0.8" \ No newline at end of file diff --git a/bin/gfold/Cargo.toml b/bin/gfold/Cargo.toml index 1dad869..a9ce165 100644 --- a/bin/gfold/Cargo.toml +++ b/bin/gfold/Cargo.toml @@ -1,16 +1,17 @@ [package] name = "gfold" version = "4.4.1" -edition = "2021" -authors = ["Nick Gerace "] categories = ["command-line-utilities", "command-line-interface"] description = "CLI tool to help keep track of your Git repositories." -homepage = "https://nickgerace.dev" keywords = ["git", "cli"] -license = "Apache-2.0" readme = "../../README.md" -repository = "https://github.com/nickgerace/gfold/" + +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true [dependencies] libgfold = { version = "0.1.2", path = "../../lib/libgfold" } @@ -20,6 +21,7 @@ clap = { workspace = true } dirs = { workspace = true } env_logger = { workspace = true } log = { workspace = true } +remain = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } termcolor = { workspace = true } diff --git a/bin/gfold/src/cli.rs b/bin/gfold/src/cli.rs index dbc9f66..e9ada63 100644 --- a/bin/gfold/src/cli.rs +++ b/bin/gfold/src/cli.rs @@ -31,6 +31,7 @@ Troubleshooting: \"RUST_BACKTRACE=1\"and \"RUST_LOG=debug\". You can adjust those variable's values to aid investigation."; +#[remain::sorted] #[derive(Error, Debug)] pub enum CliError { #[error("invalid color mode provided (exec \"--help\" for options): {0}")] @@ -54,7 +55,7 @@ struct Cli { #[arg( short, long, - help = "specify display format (options: [\"standard\", \"default\", \"json\", \"classic\"])" + help = "specify display format (options: [\"standard\", \"standard-alphabetical\", \"json\", \"classic\", \"default\"])" )] display_mode: Option, #[arg( @@ -86,13 +87,14 @@ impl CliHarness { }; debug!("loaded initial config"); - if let Some(found_display_mode) = &self.cli.display_mode { - config.display_mode = match found_display_mode.to_lowercase().as_str() { - "classic" => DisplayMode::Classic, - "json" => DisplayMode::Json, - "standard" | "default" => DisplayMode::Standard, - _ => { - return Err(CliError::InvalidDisplayMode(found_display_mode.to_string()).into()) + if let Some(found_display_mode_raw) = &self.cli.display_mode { + config.display_mode = match DisplayMode::from_str(found_display_mode_raw.to_lowercase()) + { + Some(found_display_mode) => found_display_mode, + None => { + return Err( + CliError::InvalidDisplayMode(found_display_mode_raw.to_string()).into(), + ); } } } @@ -118,6 +120,7 @@ impl CliHarness { DisplayMode::Classic => (false, false), DisplayMode::Json => (true, true), DisplayMode::Standard => (true, false), + DisplayMode::StandardAlphabetical => (true, false), }; let repository_collection = RepositoryCollector::run(&config.path, include_email, include_submodules)?; diff --git a/bin/gfold/src/config.rs b/bin/gfold/src/config.rs index b865388..2a3ffb6 100644 --- a/bin/gfold/src/config.rs +++ b/bin/gfold/src/config.rs @@ -5,6 +5,7 @@ use std::path::PathBuf; use std::{env, fs, io}; use thiserror::Error; +#[remain::sorted] #[derive(Error, Debug)] pub enum ConfigError { #[error("could not find home directory")] @@ -99,17 +100,35 @@ struct EntryConfig { /// less information to be displayed, then some commands and functions might get skipped. /// In summary, while this setting is primarily for cosmetics, it may also affect runtime /// performance based on what needs to be displayed. +#[remain::sorted] #[derive(Serialize, Deserialize, Clone, Copy)] pub enum DisplayMode { - /// Informs the caller to display results in the standard (default) format. - Standard, /// Informs the caller to display results in the classic format. Classic, /// Informs the caller to display results in JSON format. Json, + /// Informs the caller to display results in the standard (default) format. All results are + /// sorted alphabetically and then sorted by status. + Standard, + /// Informs the caller to display results in the standard (default) format with a twist: all + /// results are solely sorted alphabetically (i.e. no additional sort by status). + StandardAlphabetical, +} + +impl DisplayMode { + pub fn from_str(input: impl AsRef) -> Option { + match input.as_ref() { + "classic" => Some(Self::Classic), + "json" => Some(Self::Json), + "standard" | "default" => Some(Self::Standard), + "standard-alphabetical" => Some(Self::StandardAlphabetical), + _ => None, + } + } } /// Set the color mode of results printed to `stdout`. +#[remain::sorted] #[derive(Serialize, Deserialize, Clone, Copy)] pub enum ColorMode { /// Attempt to display colors as intended (default behavior). diff --git a/bin/gfold/src/display.rs b/bin/gfold/src/display.rs index 041e57c..c5f094c 100644 --- a/bin/gfold/src/display.rs +++ b/bin/gfold/src/display.rs @@ -15,6 +15,7 @@ mod color; const PAD: usize = 2; const NONE: &str = "none"; +#[remain::sorted] #[derive(Error, Debug)] pub enum DisplayError { #[error("could not convert path (Path) to &str: {0}")] @@ -38,7 +39,8 @@ impl DisplayHarness { /// This function chooses the display execution function based on the [`DisplayMode`] provided. pub fn run(&self, reports: &RepositoryCollection) -> anyhow::Result<()> { match self.display_mode { - DisplayMode::Standard => Self::standard(reports, self.color_mode)?, + DisplayMode::Standard => Self::standard(reports, self.color_mode, false)?, + DisplayMode::StandardAlphabetical => Self::standard(reports, self.color_mode, true)?, DisplayMode::Json => Self::json(reports)?, DisplayMode::Classic => Self::classic(reports, self.color_mode)?, } @@ -46,14 +48,21 @@ impl DisplayHarness { } /// Display [`RepositoryCollection`] to `stdout` in the standard (default) format. - fn standard(reports: &RepositoryCollection, color_mode: ColorMode) -> anyhow::Result<()> { + fn standard( + reports: &RepositoryCollection, + color_mode: ColorMode, + alphabetical_sort_only: bool, + ) -> anyhow::Result<()> { debug!("detected standard display mode"); let mut all_reports = Vec::new(); for grouped_report in reports { all_reports.append(&mut grouped_report.1.clone()); } + all_reports.sort_by(|a, b| a.name.cmp(&b.name)); - all_reports.sort_by(|a, b| a.status.as_str().cmp(b.status.as_str())); + if !alphabetical_sort_only { + all_reports.sort_by(|a, b| a.status.as_str().cmp(b.status.as_str())); + } let color_harness = ColorHarness::new(&color_mode); diff --git a/bin/xtask/Cargo.toml b/bin/xtask/Cargo.toml index 94f342e..b4dd2a1 100644 --- a/bin/xtask/Cargo.toml +++ b/bin/xtask/Cargo.toml @@ -1,12 +1,18 @@ [package] name = "xtask" version = "0.1.0" -edition = "2021" publish = false +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true + [dependencies] clap = { workspace = true } dirs = { workspace = true } +remain = { workspace = true } strum = { workspace = true } termcolor = { workspace = true } thiserror = { workspace = true } \ No newline at end of file diff --git a/bin/xtask/src/main.rs b/bin/xtask/src/main.rs index c1d7d5a..fa98d44 100644 --- a/bin/xtask/src/main.rs +++ b/bin/xtask/src/main.rs @@ -11,11 +11,9 @@ use thiserror::Error; pub use task::TaskHarness; pub use task::TaskRunner; +#[remain::sorted] #[derive(Error, Debug)] pub enum TaskError { - #[error(transparent)] - Io(#[from] io::Error), - #[error("cargo command failed")] CargoCommandFailed, #[error("could not determine repository root")] @@ -24,6 +22,8 @@ pub enum TaskError { HomeDirectoryNotFound, #[error("invalid task provided: {0}")] InvalidTaskProvided(String), + #[error(transparent)] + Io(#[from] io::Error), #[error("repository does not have parent directory (this should be impossible)")] RepositoryDoesNotHaveParentDirectory, #[error("command during loose bench was not successful: {0:?}")] @@ -39,6 +39,7 @@ struct Cli { command: Task, } +#[remain::sorted] #[derive(Display, Subcommand)] #[strum(serialize_all = "kebab-case")] pub enum Task { diff --git a/bin/xtask/src/task.rs b/bin/xtask/src/task.rs index d5d4bc9..861b9be 100644 --- a/bin/xtask/src/task.rs +++ b/bin/xtask/src/task.rs @@ -35,9 +35,10 @@ pub trait TaskRunner { fn run(harness: &mut TaskHarness) -> TaskResult<()>; } +#[remain::sorted] enum WriteKind { - Stdout, Stderr, + Stdout, } impl TaskHarness { diff --git a/.cargo/config b/config.toml similarity index 100% rename from .cargo/config rename to config.toml diff --git a/lib/libgfold/Cargo.toml b/lib/libgfold/Cargo.toml index 672350d..1acdae1 100644 --- a/lib/libgfold/Cargo.toml +++ b/lib/libgfold/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "libgfold" version = "0.1.2" -edition = "2021" -authors = ["Nick Gerace "] categories = ["development-tools"] description = "Provides the ability to find a minimal set of user-relevant information for Git repositories on a local filesystem." -homepage = "https://nickgerace.dev" keywords = ["git"] -license = "Apache-2.0" readme = "README.md" -repository = "https://github.com/nickgerace/gfold/" + +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true [dependencies] git2 = { workspace = true } log = { workspace = true } rayon = { workspace = true } +remain = { workspace = true } serde = { workspace = true } thiserror = { workspace = true } diff --git a/lib/libgfold/src/collector.rs b/lib/libgfold/src/collector.rs index ca80682..ea62cc2 100644 --- a/lib/libgfold/src/collector.rs +++ b/lib/libgfold/src/collector.rs @@ -11,6 +11,7 @@ use crate::repository_view::{RepositoryView, RepositoryViewError, RepositoryView mod target; #[allow(missing_docs)] +#[remain::sorted] #[derive(Error, Debug)] pub enum CollectorError { #[error(transparent)] diff --git a/lib/libgfold/src/collector/target.rs b/lib/libgfold/src/collector/target.rs index 6c2537d..dbd8ff4 100644 --- a/lib/libgfold/src/collector/target.rs +++ b/lib/libgfold/src/collector/target.rs @@ -73,11 +73,12 @@ impl TargetCollector { } /// An enum that contains 0 to N targets based on the variant. +#[remain::sorted] enum MaybeTarget { /// Contains multiple targets from recursive call(s) of [`TargetCollector::run()`]. Multiple(Vec), - /// Contains a single target. - Single(PathBuf), /// Does not contain a target. None, + /// Contains a single target. + Single(PathBuf), } diff --git a/lib/libgfold/src/lib.rs b/lib/libgfold/src/lib.rs index b296cb2..fc0205e 100644 --- a/lib/libgfold/src/lib.rs +++ b/lib/libgfold/src/lib.rs @@ -49,11 +49,11 @@ mod tests { use std::{fs, io}; use tempfile::tempdir; - /// This integration test for `gfold` covers an end-to-end usage scenario. It uses the + /// This scenario test for `gfold` covers an end-to-end usage scenario. It uses the /// [`tempfile`](tempfile) crate to create some repositories with varying states and levels /// of nesting. #[test] - fn integration() -> anyhow::Result<()> { + fn scenario() -> anyhow::Result<()> { env_logger::builder() .is_test(true) .filter_level(LevelFilter::Info) diff --git a/lib/libgfold/src/repository_view.rs b/lib/libgfold/src/repository_view.rs index 2aef6ea..6cd8462 100644 --- a/lib/libgfold/src/repository_view.rs +++ b/lib/libgfold/src/repository_view.rs @@ -15,20 +15,21 @@ use crate::status::{Status, StatusError}; mod submodule_view; #[allow(missing_docs)] +#[remain::sorted] #[derive(Error, Debug)] pub enum RepositoryViewError { + #[error("received None (Option<&OsStr>) for file name: {0}")] + FileNameNotFound(PathBuf), + #[error("could not convert file name (&OsStr) to &str: {0}")] + FileNameToStrConversionFailure(PathBuf), #[error(transparent)] FromGit2(#[from] git2::Error), #[error(transparent)] + FromStatus(#[from] StatusError), + #[error(transparent)] FromStdIo(#[from] io::Error), #[error(transparent)] FromSubmodule(#[from] SubmoduleError), - #[error(transparent)] - FromStatus(#[from] StatusError), - #[error("received None (Option<&OsStr>) for file name: {0}")] - FileNameNotFound(PathBuf), - #[error("could not convert file name (&OsStr) to &str: {0}")] - FileNameToStrConversionFailure(PathBuf), #[error("full shorthand for Git reference is invalid UTF-8")] GitReferenceShorthandInvalid, #[error("could not convert path (Path) to &str: {0}")] diff --git a/lib/libgfold/src/repository_view/submodule_view.rs b/lib/libgfold/src/repository_view/submodule_view.rs index 0ec0a0c..7859b12 100644 --- a/lib/libgfold/src/repository_view/submodule_view.rs +++ b/lib/libgfold/src/repository_view/submodule_view.rs @@ -9,16 +9,17 @@ use thiserror::Error; use crate::status::{Status, StatusError}; +#[remain::sorted] #[derive(Error, Debug)] pub enum SubmoduleError { - #[error("submodule name is invalid UTF-8")] - SubmoduleNameInvalid, #[error(transparent)] FromGit2(#[from] git2::Error), #[error(transparent)] - FromStdIo(#[from] io::Error), - #[error(transparent)] FromStatus(#[from] StatusError), + #[error(transparent)] + FromStdIo(#[from] io::Error), + #[error("submodule name is invalid UTF-8")] + SubmoduleNameInvalid, } type SubmoduleResult = Result; diff --git a/lib/libgfold/src/status.rs b/lib/libgfold/src/status.rs index 86ed454..1e05127 100644 --- a/lib/libgfold/src/status.rs +++ b/lib/libgfold/src/status.rs @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize}; use thiserror::Error; #[allow(missing_docs)] +#[remain::sorted] #[derive(Error, Debug)] pub enum StatusError { #[error(transparent)] @@ -16,6 +17,7 @@ pub enum StatusError { pub type StatusResult = Result; /// A summarized interpretation of the status of a Git working tree. +#[remain::sorted] #[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq)] pub enum Status { /// Corresponds to a "bare" working tree.