diff --git a/Cargo.lock b/Cargo.lock index d1ea2d9..86a2131 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,18 +15,67 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "autocfg" @@ -40,6 +89,44 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cc" version = "1.0.77" @@ -57,40 +144,49 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.0.29" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "is-terminal", - "once_cell", "strsim", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.0.21" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.66", ] [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" -dependencies = [ - "os_str_bytes", -] +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "console" @@ -106,19 +202,12 @@ dependencies = [ "winapi", ] -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", "crossbeam-utils", ] @@ -148,21 +237,29 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "cfg-if", + "powerfmt", ] [[package]] name = "dialoguer" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", + "shell-words", "tempfile", + "thiserror", "zeroize", ] @@ -179,36 +276,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] -name = "enum-iterator" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a0ac4aeb3a18f92eaf09c6bb9b3ac30ff61ca95514fc58cbead1c9a6bf5401" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.1.0" +name = "env_filter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828de45d0ca18782232dfb8f3ea9cc428e8ced380eb26a520baaacfc70de39ce" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" dependencies = [ - "proc-macro2", - "quote", - "syn", + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.10.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -222,6 +309,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -234,12 +331,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "form_urlencoded" @@ -261,18 +355,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "git-trim" version = "0.4.4" @@ -295,11 +377,11 @@ dependencies = [ [[package]] name = "git2" -version = "0.15.0" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2994bee4a3a6a51eb90c218523be382fd7ea09b16380b9312e9dbe955ff7c7d1" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ - "bitflags", + "bitflags 2.5.0", "libc", "libgit2-sys", "log", @@ -319,27 +401,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "humantime" @@ -357,15 +421,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-lifetimes" version = "1.0.3" @@ -373,26 +428,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] -name = "is-terminal" -version = "0.4.1" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" -dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes", - "rustix", - "windows-sys", -] +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" @@ -411,15 +460,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.138" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" -version = "0.14.0+1.5.0" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a00859c70c8a4f7218e6d1cc32875c4b55f6799445b842b0d8ed5e4c3d959b" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ "cc", "libc", @@ -431,9 +480,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.23" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" dependencies = [ "cc", "libc", @@ -461,14 +510,17 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "log" -version = "0.4.17" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "man" @@ -481,9 +533,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memoffset" @@ -495,29 +547,25 @@ dependencies = [ ] [[package]] -name = "ntapi" -version = "0.4.0" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc51db7b362b205941f71232e56c625156eb9a929f8cf74a428fd5bc094a4afc" -dependencies = [ - "winapi", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] -name = "num_cpus" -version = "1.14.0" +name = "num_threads" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ - "hermit-abi 0.1.19", "libc", ] [[package]] name = "once_cell" -version = "1.16.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl-probe" @@ -538,12 +586,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "paw" version = "1.0.0" @@ -562,7 +604,7 @@ checksum = "0f35583365be5d148e959284f42526841917b7bfa09e2d1a7ad5dde2cf0eaa39" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -584,84 +626,66 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "rayon" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "regex" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ - "bitflags", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.7.0" +name = "regex-automata" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -670,18 +694,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "roff" @@ -690,33 +705,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33e4fb37ba46888052c763e4ec2acfedd8f00f62897b630cadb6298b833675e" [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rustix" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23" dependencies = [ - "semver", + "bitflags 1.3.2", + "errno 0.2.8", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.3", + "windows-sys 0.42.0", ] [[package]] name = "rustix" -version = "0.36.4" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags", - "errno", - "io-lifetimes", + "bitflags 2.5.0", + "errno 0.3.9", "libc", - "linux-raw-sys", - "windows-sys", + "linux-raw-sys 0.4.14", + "windows-sys 0.52.0", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "scopeguard" @@ -726,15 +751,49 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "semver" -version = "1.0.14" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "serde" -version = "1.0.148" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "smawk" @@ -744,9 +803,9 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" @@ -760,40 +819,26 @@ dependencies = [ ] [[package]] -name = "sysinfo" -version = "0.27.1" +name = "syn" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb297c0afb439440834b4bcf02c5c9da8ec2e808e70f36b0d8e815ff403bd24" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "winapi", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "tempfile" -version = "3.3.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", + "rustix 0.38.34", + "windows-sys 0.52.0", ] [[package]] @@ -812,15 +857,15 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907" dependencies = [ - "rustix", - "windows-sys", + "rustix 0.36.4", + "windows-sys 0.42.0", ] [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "terminal_size 0.2.3", @@ -830,31 +875,36 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.66", ] [[package]] name = "time" -version = "0.3.17" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -862,16 +912,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -938,6 +989,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "vcpkg" version = "0.2.15" @@ -946,19 +1003,15 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "7.4.4" +version = "8.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efadd36bc6fde40c6048443897d69511a19161c0756cb704ed403f8dfd2b7d1c" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" dependencies = [ "anyhow", + "cargo_metadata", "cfg-if", - "enum-iterator", - "getset", - "git2", - "rustc_version", + "regex", "rustversion", - "sysinfo", - "thiserror", "time", ] @@ -990,15 +1043,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1011,13 +1055,38 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.0", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm 0.42.0", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "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]] @@ -1026,42 +1095,90 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + [[package]] name = "windows_aarch64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + [[package]] name = "windows_i686_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +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" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + [[package]] name = "windows_x86_64_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + [[package]] name = "windows_x86_64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + [[package]] name = "zeroize" version = "1.5.7" diff --git a/Cargo.toml b/Cargo.toml index 49f7db0..7a88a18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,22 +23,23 @@ required-features = ["build-man"] build-man = ["man"] [build-dependencies] -vergen = "7.4.4" +vergen = { version = "8.0.0", features = ["build", "cargo", "git", "gitcl"] } +anyhow = "1.0.86" [dependencies] -dialoguer = "0.10.2" -env_logger = "0.10.0" -git2 = "0.15.0" -log = "0.4.17" +dialoguer = "0.11.0" +env_logger = "0.11.3" +git2 = "0.18.3" +log = "0.4.21" paw = "1.0.0" -clap = { version = "4.0.27", features = ["derive"] } -anyhow = "1.0.66" -rayon = "1.6.0" -thiserror = "1.0.37" -crossbeam-channel = "0.5.6" -textwrap = { version = "0.16.0", features = ["terminal_size"] } +clap = { version = "4.5.4", features = ["derive"] } +anyhow = "1.0.86" +rayon = "1.10.0" +thiserror = "1.0.61" +crossbeam-channel = "0.5.13" +textwrap = { version = "0.16.1", features = ["terminal_size"] } man = { version = "0.3.0", optional = true } [dev-dependencies] -tempfile = "3.3.0" +tempfile = "3.10.1" diff --git a/README.md b/README.md index 51af7af..fb55a6c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ You might need to install `libssl-dev` and `pkg-config` packages if you build fr #### Are you using git-flow? -Don't forget to `git config trim.bases develop,master`. +Don't forget to `git config trim.bases develop,main`. ## Why have you made this? Show me how it works. @@ -46,7 +46,7 @@ After some working with the repository, you'll execute `git fetch --prune` or `g However, you'll likely see the mess of local branches whose upstreams are already merged and deleted on the remote. Because `git fetch --prune` only deletes remote-tracking branches (or remote references, `refs/remotes//`) but not local tracking branches (`refs/heads/`) for you. It is worse if remote branches that are merged but the maintainer forgot to delete them, -the remote-tracking branches would not be deleted and so on even if you know that it is merged into the master. +the remote-tracking branches would not be deleted and so on even if you know that it is merged into the main. ![before](images/0-before.png) @@ -111,7 +111,7 @@ Not because `--force` is dangerous. Just `gone` doesn't mean it is fully merged * It inspects the upstream of tracking branches whether they are 'fully' merged, not just whether they are gone. I've spent about half of the code on scenario tests. I wanted to make sure that it doesn't delete unmerged contents accidentally in any case. - * It supports github flow (master-feature tiered branch strategy), git flow (master-develop-feature tiered branch strategy), + * It supports github flow (main-feature tiered branch strategy), git flow (main-develop-feature tiered branch strategy), and simple workflow (with a remote repo and a local clone), and triangular workflow (with two remote repos and a local clone). * It is merge styles agnostic. It can detect common merge styles such as merge with a merge commit, rebase/ff merge and squash merge. * It can also inspect remote branches so it deletes them from remotes for you in case you've forgotten to. @@ -136,12 +136,12 @@ The term is borrowed from the git's remote tracking states. ### I'm even more lazy to type `git trim` -Try this `post-merge` hook. It automatically calls `git trim --no-update` everytime you `git pull` on `master` or `develop`. `git config fetch.prune true` is recommended with this hook. +Try this `post-merge` hook. It automatically calls `git trim --no-update` everytime you `git pull` on `main` or `develop`. `git config fetch.prune true` is recommended with this hook. ```shell #!/bin/bash BRANCH=$(git rev-parse --abbrev-ref HEAD) case "$HEAD_BRANCH" in - "master"|"develop") ;; + "main"|"develop") ;; *) exit ;; esac diff --git a/build.rs b/build.rs index b8a272a..dd6afb3 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,11 @@ -use vergen::{vergen, Config}; +use anyhow::Context; +use vergen::EmitBuilder; -fn main() { - // Generate the 'cargo:' key output - let mut config = Config::default(); - *config.git_mut().skip_if_error_mut() = true; - vergen(config).expect("Unable to generate the cargo keys!"); +fn main() -> anyhow::Result<()> { + EmitBuilder::builder() + .all_build() + .all_cargo() + .all_git() + .emit() + .context("Unable to generate the cargo keys!") } diff --git a/src/main.rs b/src/main.rs index 8d2edeb..085cc67 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,12 +22,9 @@ fn main() -> Result<()> { let args = Args::parse(); env_logger::init(); - info!("SEMVER: {}", env!("VERGEN_BUILD_SEMVER")); - info!("SHA: {:?}", option_env!("VERGEN_GIT_SHA")); - info!( - "COMMIT_DATE: {:?}", - option_env!("VERGEN_GIT_COMMIT_TIMESTAMP") - ); + info!("SEMVER: {}", env!("VERGEN_GIT_DESCRIBE")); + info!("SHA: {:?}", env!("VERGEN_GIT_SHA")); + info!("COMMIT_DATE: {:?}", env!("VERGEN_GIT_COMMIT_TIMESTAMP")); info!("TARGET_TRIPLE: {}", env!("VERGEN_CARGO_TARGET_TRIPLE")); let git = Git::try_from(Repository::open_from_env()?)?; @@ -104,9 +101,9 @@ fn error_no_bases(repo: &Repository, bases: &ConfigValue>) -> Re } } const GENERAL_HELP: &[&str] = &[ - "`git config trim.bases develop,master` for a repository.", - "`git config --global trim.bases develop,master` to set globally.", - "`git trim --bases develop,master` to set temporarily.", + "`git config trim.bases develop,main` for a repository.", + "`git config --global trim.bases develop,main` to set globally.", + "`git trim --bases develop,main` to set temporarily.", ]; match bases { ConfigValue::Explicit(_) => { diff --git a/src/remote_head_change_checker.rs b/src/remote_head_change_checker.rs index d4ee331..782b7ad 100644 --- a/src/remote_head_change_checker.rs +++ b/src/remote_head_change_checker.rs @@ -96,9 +96,9 @@ impl RemoteHeadChangeChecker { } eprintln!( r#"Or you can set base branches manually: - * `git config trim.bases develop,master` will set base branches for git-trim for a repository. - * `git config --global trim.bases develop,master` will set base branches for `git-trim` globally. - * `git trim --bases develop,master` will temporarily set base branches for `git-trim`"# + * `git config trim.bases develop,main` will set base branches for git-trim for a repository. + * `git config --global trim.bases develop,main` will set base branches for `git-trim` globally. + * `git trim --bases develop,main` will temporarily set base branches for `git-trim`"# ); Ok(()) diff --git a/tests/config.rs b/tests/config.rs index 7aa1588..03307a8 100644 --- a/tests/config.rs +++ b/tests/config.rs @@ -45,7 +45,7 @@ fn test_bases_implicit_value() -> Result<()> { assert_eq!( config.bases, - ConfigValue::Implicit(HashSet::from_iter(vec!["master".to_owned()])) + ConfigValue::Implicit(HashSet::from_iter(vec!["main".to_owned()])) ); Ok(()) } diff --git a/tests/filter_accidential_track.rs b/tests/filter_accidential_track.rs index 14d3d4b..adb394c 100644 --- a/tests/filter_accidential_track.rs +++ b/tests/filter_accidential_track.rs @@ -28,7 +28,7 @@ fn fixture() -> Fixture { echo "Hello World!" > README.md git add README.md git commit -m "Initial commit" - git push -u origin master + git push -u origin main EOF git clone origin contributer @@ -75,9 +75,9 @@ fn test_default_config_tries_to_delete_accidential_track() -> Result<()> { local < Result<()> { local < PlanParam<'static> { use DeleteRange::*; PlanParam { - bases: vec!["master"], + bases: vec!["main"], protected_patterns: Vec::new(), delete: DeleteFilter::from_iter(vec![ MergedLocal, diff --git a/tests/hub_cli_checkout.rs b/tests/hub_cli_checkout.rs index e7f56f1..4095711 100644 --- a/tests/hub_cli_checkout.rs +++ b/tests/hub_cli_checkout.rs @@ -34,7 +34,7 @@ fn fixture() -> Fixture { git config push.default simple git remote add upstream ../upstream git fetch upstream - git branch -u upstream/master master + git branch -u upstream/main main EOF origin < Result<()> { EOF # clicked delete branch button origin < Result<()> { EOF # click delete button origin < Result<()> { EOF # clicked delete branch button origin < Result<()> { "local", r#" origin < Result<()> { r#" origin < Result<()> { "local", r#" origin < Result<()> { git push -u origin "$NAME" } local < Result<()> { r#" origin < Result<()> { "local", r#" origin < Result<()> { git config core.bare true EOF local < Fixture { git add README.md git commit -m "Initial commit" - git branch develop master + git branch develop main EOF git clone origin local local < Fixture { fn param() -> PlanParam<'static> { PlanParam { - bases: vec!["develop", "master"], // Need to set bases manually for git flow + bases: vec!["develop", "main"], // Need to set bases manually for git flow ..test_default_param() } } @@ -111,7 +111,7 @@ fn test_feature_to_develop_but_forgot_to_delete() -> Result<()> { } #[test] -fn test_develop_to_master() -> Result<()> { +fn test_develop_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" @@ -128,7 +128,7 @@ fn test_develop_to_master() -> Result<()> { git merge feature git branch -d feature - git checkout master + git checkout main git merge develop EOF "#, @@ -147,7 +147,7 @@ fn test_develop_to_master() -> Result<()> { } #[test] -fn test_develop_to_master_but_forgot_to_delete() -> Result<()> { +fn test_develop_to_main_but_forgot_to_delete() -> Result<()> { let guard = fixture().prepare( "local", r#" @@ -163,7 +163,7 @@ fn test_develop_to_master_but_forgot_to_delete() -> Result<()> { git checkout develop git merge feature - git checkout master + git checkout main git merge develop EOF "#, @@ -183,13 +183,13 @@ fn test_develop_to_master_but_forgot_to_delete() -> Result<()> { } #[test] -fn test_hotfix_to_master() -> Result<()> { +fn test_hotfix_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" # prepare awesome patch local < Result<()> { EOF origin < Result<()> { } #[test] -fn test_hotfix_to_master_forgot_to_delete() -> Result<()> { +fn test_hotfix_to_main_forgot_to_delete() -> Result<()> { let guard = fixture().prepare( "local", r#" # prepare awesome patch local < Result<()> { EOF origin < Result<()> { } #[test] -fn test_rejected_hotfix_to_master() -> Result<()> { +fn test_rejected_hotfix_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" # prepare awesome patch local < Result<()> { } #[test] -fn test_protected_feature_to_master() -> Result<()> { +fn test_protected_feature_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" @@ -368,8 +368,8 @@ fn test_protected_feature_to_master() -> Result<()> { git merge feature git branch -d feature - git checkout master - git merge master + git checkout main + git merge main EOF "#, )?; @@ -434,7 +434,7 @@ fn test_protected_branch_shouldnt_be_stray() -> Result<()> { let plan = get_trim_plan( &git, &PlanParam { - protected_patterns: vec!["refs/heads/master", "refs/heads/develop"], + protected_patterns: vec!["refs/heads/main", "refs/heads/develop"], ..param() }, )?; diff --git a/tests/simple_github_flow.rs b/tests/simple_github_flow.rs index 47eaf67..7b6a254 100644 --- a/tests/simple_github_flow.rs +++ b/tests/simple_github_flow.rs @@ -45,7 +45,7 @@ fn test_accepted() -> Result<()> { "local", r#" origin < Result<()> { "local", r#" origin < Result<()> { "local", r#" origin < Result<()> { "local", r#" origin < Fixture { echo "Hello World!" > README.md git add README.md git commit -m "Initial commit" - git branch develop master + git branch develop main EOF git clone upstream origin -o upstream origin < Fixture { git config push.default simple git remote add upstream ../upstream git fetch upstream - git branch -u upstream/master master + git branch -u upstream/main main git branch develop upstream/develop git branch -u upstream/develop develop @@ -50,7 +50,7 @@ fn fixture() -> Fixture { fn param() -> PlanParam<'static> { PlanParam { - bases: vec!["develop", "master"], // Need to set bases manually for git flow + bases: vec!["develop", "main"], // Need to set bases manually for git flow ..test_default_param() } } @@ -136,7 +136,7 @@ fn test_feature_to_develop_but_forgot_to_delete() -> Result<()> { } #[test] -fn test_develop_to_master() -> Result<()> { +fn test_develop_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" @@ -157,7 +157,7 @@ fn test_develop_to_master() -> Result<()> { git checkout develop git merge refs/pull/1/head - git checkout master + git checkout main git merge develop EOF @@ -181,7 +181,7 @@ fn test_develop_to_master() -> Result<()> { } #[test] -fn test_develop_to_master_but_forgot_to_delete() -> Result<()> { +fn test_develop_to_main_but_forgot_to_delete() -> Result<()> { let guard = fixture().prepare( "local", r#" @@ -202,7 +202,7 @@ fn test_develop_to_master_but_forgot_to_delete() -> Result<()> { git checkout develop git merge refs/pull/1/head - git checkout master + git checkout main git merge develop EOF "#, @@ -222,13 +222,13 @@ fn test_develop_to_master_but_forgot_to_delete() -> Result<()> { } #[test] -fn test_hotfix_to_master() -> Result<()> { +fn test_hotfix_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" # prepare awesome patch local < Result<()> { EOF upstream < Result<()> { } #[test] -fn test_hotfix_to_master_forgot_to_delete() -> Result<()> { +fn test_hotfix_to_main_forgot_to_delete() -> Result<()> { let guard = fixture().prepare( "local", r#" # prepare awesome patch local < Result<()> { EOF upstream < Result<()> { } #[test] -fn test_rejected_hotfix_to_master() -> Result<()> { +fn test_rejected_hotfix_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" # prepare awesome patch local < Result<()> { } #[test] -fn test_protected_feature_to_master() -> Result<()> { +fn test_protected_feature_to_main() -> Result<()> { let guard = fixture().prepare( "local", r#" @@ -446,7 +446,7 @@ fn test_protected_feature_to_master() -> Result<()> { git checkout develop git merge refs/pull/1/head - git checkout master + git checkout main git merge develop EOF diff --git a/tests/triangular_github_flow.rs b/tests/triangular_github_flow.rs index 9268fa8..a933855 100644 --- a/tests/triangular_github_flow.rs +++ b/tests/triangular_github_flow.rs @@ -34,7 +34,7 @@ fn fixture() -> Fixture { git config push.default simple git remote add upstream ../upstream git fetch upstream - git branch -u upstream/master master + git branch -u upstream/main main EOF # prepare awesome patch local <