diff --git a/Cargo.lock b/Cargo.lock index 25430b2d8a..e72bf5fb35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,6 +123,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -234,6 +240,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -384,6 +396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", + "regex-automata 0.4.9", "serde", ] @@ -421,6 +434,12 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" + [[package]] name = "bzip2" version = "0.4.4" @@ -625,6 +644,12 @@ dependencies = [ "roff", ] +[[package]] +name = "clru" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" + [[package]] name = "color-eyre" version = "0.6.3" @@ -808,9 +833,9 @@ checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -1000,6 +1025,20 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "deflate64" version = "0.1.9" @@ -1008,9 +1047,9 @@ checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" [[package]] name = "demand" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c47e28442b8cafbd1e05139fa18993058da13baf6c7110d47aac2e570169ce" +checksum = "7d6c59d4d22c0837e599e2d8875fe2a1b16669a098a3530e7a23985c2d1387ab" dependencies = [ "console", "fuzzy-matcher", @@ -1321,6 +1360,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "faster-hex" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" +dependencies = [ + "serde", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -1490,140 +1538,1024 @@ dependencies = [ ] [[package]] -name = "futures-channel" -version = "0.3.31" +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fuzzy-matcher" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +dependencies = [ + "thread_local", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "git2" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "url", +] + +[[package]] +name = "gix" +version = "0.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736f14636705f3a56ea52b553e67282519418d9a35bb1e90b3a9637a00296b68" +dependencies = [ + "gix-actor", + "gix-archive", + "gix-attributes", + "gix-command", + "gix-commitgraph", + "gix-config", + "gix-credentials", + "gix-date", + "gix-diff", + "gix-dir", + "gix-discover", + "gix-features", + "gix-filter", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-hashtable", + "gix-ignore", + "gix-index", + "gix-lock", + "gix-mailmap", + "gix-negotiate", + "gix-object", + "gix-odb", + "gix-pack", + "gix-path", + "gix-pathspec", + "gix-prompt", + "gix-protocol", + "gix-ref", + "gix-refspec", + "gix-revision", + "gix-revwalk", + "gix-sec", + "gix-shallow", + "gix-status", + "gix-submodule", + "gix-tempfile", + "gix-trace", + "gix-transport", + "gix-traverse", + "gix-url", + "gix-utils", + "gix-validate", + "gix-worktree", + "gix-worktree-state", + "gix-worktree-stream", + "once_cell", + "parking_lot", + "regex", + "signal-hook", + "smallvec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-actor" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20018a1a6332e065f1fcc8305c1c932c6b8c9985edea2284b3c79dc6fa3ee4b2" +dependencies = [ + "bstr", + "gix-date", + "gix-utils", + "itoa", + "thiserror 2.0.11", + "winnow", +] + +[[package]] +name = "gix-archive" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d22c6ecdb350461a975159ebe514294064b9542a4cbc4a12d00c3f46a1107ce" +dependencies = [ + "bstr", + "gix-date", + "gix-object", + "gix-worktree-stream", + "jiff", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-attributes" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f151000bf662ef5f641eca6102d942ee31ace80f271a3ef642e99776ce6ddb38" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "gix-quote", + "gix-trace", + "kstring", + "smallvec", + "thiserror 2.0.11", + "unicode-bom", +] + +[[package]] +name = "gix-bitmap" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540" +dependencies = [ + "thiserror 2.0.11", +] + +[[package]] +name = "gix-chunk" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f" +dependencies = [ + "thiserror 2.0.11", +] + +[[package]] +name = "gix-command" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb410b84d6575db45e62025a9118bdbf4d4b099ce7575a76161e898d9ca98df1" +dependencies = [ + "bstr", + "gix-path", + "gix-trace", + "shell-words", +] + +[[package]] +name = "gix-commitgraph" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e23a8ec2d8a16026a10dafdb6ed51bcfd08f5d97f20fa52e200bc50cb72e4877" +dependencies = [ + "bstr", + "gix-chunk", + "gix-features", + "gix-hash", + "memmap2", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-config" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377c1efd2014d5d469e0b3cd2952c8097bce9828f634e04d5665383249f1d9e9" +dependencies = [ + "bstr", + "gix-config-value", + "gix-features", + "gix-glob", + "gix-path", + "gix-ref", + "gix-sec", + "memchr", + "once_cell", + "smallvec", + "thiserror 2.0.11", + "unicode-bom", + "winnow", +] + +[[package]] +name = "gix-config-value" +version = "0.14.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11365144ef93082f3403471dbaa94cfe4b5e72743bdb9560719a251d439f4cee" +dependencies = [ + "bitflags", + "bstr", + "gix-path", + "libc", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-credentials" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf950f9ee1690bb9c4388b5152baa8a9f41ad61e5cf1ba0ec8c207b08dab9e45" +dependencies = [ + "bstr", + "gix-command", + "gix-config-value", + "gix-path", + "gix-prompt", + "gix-sec", + "gix-trace", + "gix-url", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-date" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f" +dependencies = [ + "bstr", + "itoa", + "jiff", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-diff" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62afb7f4ca0acdf4e9dad92065b2eb1bf2993bcc5014b57bc796e3a365b17c4d" +dependencies = [ + "bstr", + "gix-attributes", + "gix-command", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", + "gix-pathspec", + "gix-tempfile", + "gix-trace", + "gix-traverse", + "gix-worktree", + "imara-diff", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-dir" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1d78db3927a12f7d1b788047b84efacaab03ef25738bd1c77856ad8966bd57b" +dependencies = [ + "bstr", + "gix-discover", + "gix-fs", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", + "gix-pathspec", + "gix-trace", + "gix-utils", + "gix-worktree", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-discover" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c2414bdf04064e0f5a5aa029dfda1e663cf9a6c4bfc8759f2d369299bb65d8" +dependencies = [ + "bstr", + "dunce", + "gix-fs", + "gix-hash", + "gix-path", + "gix-ref", + "gix-sec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-features" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bfdd4838a8d42bd482c9f0cb526411d003ee94cc7c7b08afe5007329c71d554" +dependencies = [ + "bytes", + "bytesize", + "crc32fast", + "crossbeam-channel", + "flate2", + "gix-hash", + "gix-trace", + "gix-utils", + "libc", + "once_cell", + "parking_lot", + "prodash", + "sha1_smol", + "thiserror 2.0.11", + "walkdir", +] + +[[package]] +name = "gix-filter" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdcc36cd7dbc63ed0ec3558645886553d1afd3cd09daa5efb9cba9cceb942bbb" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes", + "gix-command", + "gix-hash", + "gix-object", + "gix-packetline-blocking", + "gix-path", + "gix-quote", + "gix-trace", + "gix-utils", + "smallvec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-fs" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "182e7fa7bfdf44ffb7cfe7451b373cdf1e00870ac9a488a49587a110c562063d" +dependencies = [ + "fastrand", + "gix-features", + "gix-utils", +] + +[[package]] +name = "gix-glob" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9c7249fa0a78f9b363aa58323db71e0a6161fd69860ed6f48dedf0ef3a314e" +dependencies = [ + "bitflags", + "bstr", + "gix-features", + "gix-path", +] + +[[package]] +name = "gix-hash" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e81c5ec48649b1821b3ed066a44efb95f1a268b35c1d91295e61252539fbe9f8" +dependencies = [ + "faster-hex", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-hashtable" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189130bc372accd02e0520dc5ab1cef318dcc2bc829b76ab8d84bbe90ac212d1" +dependencies = [ + "gix-hash", + "hashbrown 0.14.5", + "parking_lot", +] + +[[package]] +name = "gix-ignore" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f529dcb80bf9855c0a7c49f0ac588df6d6952d63a63fefc254b9c869d2cdf6f" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "gix-trace", + "unicode-bom", +] + +[[package]] +name = "gix-index" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acd12e3626879369310fffe2ac61acc828613ef656b50c4ea984dd59d7dc85d8" +dependencies = [ + "bitflags", + "bstr", + "filetime", + "fnv", + "gix-bitmap", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-traverse", + "gix-utils", + "gix-validate", + "hashbrown 0.14.5", + "itoa", + "libc", + "memmap2", + "rustix", + "smallvec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-lock" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9739815270ff6940968441824d162df9433db19211ca9ba8c3fc1b50b849c642" +dependencies = [ + "gix-tempfile", + "gix-utils", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-mailmap" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017996966133afb1e631796d8cf32e43300f8f76233f2a15ce9af5be5069b0a6" +dependencies = [ + "bstr", + "gix-actor", + "gix-date", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-negotiate" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a8af1ef7bbe303d30b55312b7f4d33e955de43a3642ae9b7347c623d80ef80" +dependencies = [ + "bitflags", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-object", + "gix-revwalk", + "smallvec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-object" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc4b3a0044244f0fe22347fb7a79cca165e37829d668b41b85ff46a43e5fd68" +dependencies = [ + "bstr", + "gix-actor", + "gix-date", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-path", + "gix-utils", + "gix-validate", + "itoa", + "smallvec", + "thiserror 2.0.11", + "winnow", +] + +[[package]] +name = "gix-odb" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e93457df69cd09573608ce9fa4f443fbd84bc8d15d8d83adecd471058459c1b" +dependencies = [ + "arc-swap", + "gix-date", + "gix-features", + "gix-fs", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-pack", + "gix-path", + "gix-quote", + "parking_lot", + "tempfile", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-pack" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc13a475b3db735617017fb35f816079bf503765312d4b1913b18cf96f3fa515" +dependencies = [ + "clru", + "gix-chunk", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-path", + "gix-tempfile", + "memmap2", + "parking_lot", + "smallvec", + "thiserror 2.0.11", + "uluru", +] + +[[package]] +name = "gix-packetline" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e5ae6bc3ac160a6bf44a55f5537813ca3ddb08549c0fd3e7ef699c73c439cd" +dependencies = [ + "bstr", + "faster-hex", + "gix-trace", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-packetline-blocking" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cbf8767c6abd5a6779f586702b5bcd8702380f4208219449cf1c9d0cd1e17c" +dependencies = [ + "bstr", + "faster-hex", + "gix-trace", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-path" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c40f12bb65a8299be0cfb90fe718e3be236b7a94b434877012980863a883a99f" +dependencies = [ + "bstr", + "gix-trace", + "home", + "once_cell", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-pathspec" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6430d3a686c08e9d59019806faa78c17315fe22ae73151a452195857ca02f86c" +dependencies = [ + "bitflags", + "bstr", + "gix-attributes", + "gix-config-value", + "gix-glob", + "gix-path", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-prompt" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79f2185958e1512b989a007509df8d61dca014aa759a22bee80cfa6c594c3b6d" +dependencies = [ + "gix-command", + "gix-config-value", + "parking_lot", + "rustix", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-protocol" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c61bd61afc6b67d213241e2100394c164be421e3f7228d3521b04f48ca5ba90" +dependencies = [ + "bstr", + "gix-credentials", + "gix-date", + "gix-features", + "gix-hash", + "gix-lock", + "gix-negotiate", + "gix-object", + "gix-ref", + "gix-refspec", + "gix-revwalk", + "gix-shallow", + "gix-trace", + "gix-transport", + "gix-utils", + "maybe-async", + "thiserror 2.0.11", + "winnow", +] + +[[package]] +name = "gix-quote" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e49357fccdb0c85c0d3a3292a9f6db32d9b3535959b5471bb9624908f4a066c6" +dependencies = [ + "bstr", + "gix-utils", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-ref" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47adf4c5f933429f8554e95d0d92eee583cfe4b95d2bf665cd6fd4a1531ee20c" +dependencies = [ + "gix-actor", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-path", + "gix-tempfile", + "gix-utils", + "gix-validate", + "memmap2", + "thiserror 2.0.11", + "winnow", +] + +[[package]] +name = "gix-refspec" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59650228d8f612f68e7f7a25f517fcf386c5d0d39826085492e94766858b0a90" +dependencies = [ + "bstr", + "gix-hash", + "gix-revision", + "gix-validate", + "smallvec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-revision" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fe28bbccca55da6d66e6c6efc6bb4003c29d407afd8178380293729733e6b53" +dependencies = [ + "bitflags", + "bstr", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", + "gix-trace", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-revwalk" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ecb80c235b1e9ef2b99b23a81ea50dd569a88a9eb767179793269e0e616247" +dependencies = [ + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "smallvec", + "thiserror 2.0.11", +] + +[[package]] +name = "gix-sec" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "d84dae13271f4313f8d60a166bf27e54c968c7c33e2ffd31c48cafe5da649875" dependencies = [ - "futures-core", - "futures-sink", + "bitflags", + "gix-path", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "futures-core" -version = "0.3.31" +name = "gix-shallow" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "ab72543011e303e52733c85bef784603ef39632ddf47f69723def52825e35066" +dependencies = [ + "bstr", + "gix-hash", + "gix-lock", + "thiserror 2.0.11", +] [[package]] -name = "futures-executor" -version = "0.3.31" +name = "gix-status" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "414cc1d85079d7ca32c3ab4a6479bf7e174cd251c74a82339c6cc393da3f4883" dependencies = [ - "futures-core", - "futures-task", - "futures-util", + "bstr", + "filetime", + "gix-diff", + "gix-dir", + "gix-features", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", + "gix-pathspec", + "gix-worktree", + "portable-atomic", + "thiserror 2.0.11", ] [[package]] -name = "futures-io" -version = "0.3.31" +name = "gix-submodule" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "74972fe8d46ac8a09490ae1e843b4caf221c5b157c5ac17057e8e1c38417a3ac" +dependencies = [ + "bstr", + "gix-config", + "gix-path", + "gix-pathspec", + "gix-refspec", + "gix-url", + "thiserror 2.0.11", +] [[package]] -name = "futures-macro" -version = "0.3.31" +name = "gix-tempfile" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "2558f423945ef24a8328c55d1fd6db06b8376b0e7013b1bb476cc4ffdf678501" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", + "dashmap 6.1.0", + "gix-fs", + "libc", + "once_cell", + "parking_lot", + "signal-hook", + "signal-hook-registry", + "tempfile", ] [[package]] -name = "futures-sink" -version = "0.3.31" +name = "gix-trace" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7" [[package]] -name = "futures-task" -version = "0.3.31" +name = "gix-transport" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "11187418489477b1b5b862ae1aedbbac77e582f2c4b0ef54280f20cfe5b964d9" +dependencies = [ + "base64 0.22.1", + "bstr", + "gix-command", + "gix-credentials", + "gix-features", + "gix-packetline", + "gix-quote", + "gix-sec", + "gix-url", + "reqwest", + "thiserror 2.0.11", +] [[package]] -name = "futures-util" -version = "0.3.31" +name = "gix-traverse" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "2bec70e53896586ef32a3efa7e4427b67308531ed186bb6120fb3eca0f0d61b4" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "bitflags", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", + "smallvec", + "thiserror 2.0.11", ] [[package]] -name = "fuzzy-matcher" -version = "0.3.7" +name = "gix-url" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +checksum = "29218c768b53dd8f116045d87fec05b294c731a4b2bdd257eeca2084cc150b13" dependencies = [ - "thread_local", + "bstr", + "gix-features", + "gix-path", + "percent-encoding", + "thiserror 2.0.11", + "url", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "gix-utils" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "ff08f24e03ac8916c478c8419d7d3c33393da9bb41fa4c24455d5406aeefd35f" dependencies = [ - "typenum", - "version_check", + "bstr", + "fastrand", + "unicode-normalization", ] [[package]] -name = "getrandom" -version = "0.2.15" +name = "gix-validate" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "9eaa01c3337d885617c0a42e92823922a2aea71f4caeace6fe87002bdcadbd90" dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", + "bstr", + "thiserror 2.0.11", ] [[package]] -name = "ghash" -version = "0.5.1" +name = "gix-worktree" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +checksum = "6673512f7eaa57a6876adceca6978a501d6c6569a4f177767dc405f8b9778958" dependencies = [ - "opaque-debug", - "polyval", + "bstr", + "gix-attributes", + "gix-features", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", + "gix-validate", ] [[package]] -name = "gimli" -version = "0.28.1" +name = "gix-worktree-state" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "86f5e199ad5af972086683bd31d640c82cb85885515bf86d86236c73ce575bf0" +dependencies = [ + "bstr", + "gix-features", + "gix-filter", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", + "gix-worktree", + "io-close", + "thiserror 2.0.11", +] [[package]] -name = "git2" +name = "gix-worktree-stream" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "f61b0463c3cf4d07f2c72a10bdb03a2e4d70a9c26416c639346ad67456834485" dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "openssl-probe", - "openssl-sys", - "url", + "gix-attributes", + "gix-features", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-object", + "gix-path", + "gix-traverse", + "parking_lot", + "thiserror 2.0.11", ] [[package]] @@ -1686,6 +2618,10 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "hashbrown" @@ -1735,6 +2671,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "homedir" version = "0.3.4" @@ -1793,6 +2738,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "human_format" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3b1f728c459d27b12448862017b96ad4767b1ec2ec5e6434e99f1577f085b8" + [[package]] name = "humansize" version = "2.1.3" @@ -1924,7 +2875,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc1f8715195dffc4caddcf1cf3128da15fe5d8a137606ea8856c9300047d5a2" dependencies = [ - "dashmap", + "dashmap 5.5.3", "find-crate", "fluent", "fluent-syntax", @@ -2136,6 +3087,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "imara-diff" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc9da1a252bd44cd341657203722352efc9bc0c847d06ea6d2dc1cd1135e0a01" +dependencies = [ + "ahash", + "hashbrown 0.14.5", +] + [[package]] name = "impl-tools" version = "0.10.3" @@ -2219,13 +3180,14 @@ dependencies = [ [[package]] name = "insta" -version = "1.42.0" +version = "1.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513e4067e16e69ed1db5ab56048ed65db32d10ba5fc1217f5393f8f17d8b5a5" +checksum = "71c1b125e30d93896b365e156c33dadfffab45ee8400afcbba4752f59de08a86" dependencies = [ "console", "linked-hash-map", "once_cell", + "pin-project", "regex", "serde", "similar", @@ -2250,6 +3212,16 @@ dependencies = [ "unic-langid", ] +[[package]] +name = "io-close" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "io_tee" version = "0.1.1" @@ -2301,6 +3273,35 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +[[package]] +name = "jiff" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a85348106ab244d90fe2d70faad939b71c5dad1258e5da9116e176064fc6c078" +dependencies = [ + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", + "windows-sys 0.59.0", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2cec2f5d266af45a071ece48b1fb89f3b00b2421ac3a5fe10285a6caaa60d3" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a63c62e404e7b92979d2792352d885a7f8f83fd1d0d31eea582d77b2ceca697e" +dependencies = [ + "jiff-tzdb", +] + [[package]] name = "jobserver" version = "0.1.32" @@ -2332,9 +3333,9 @@ dependencies = [ [[package]] name = "kdl" -version = "6.3.2" +version = "6.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a029b7a3f0cb86b0fcfd09718eeba23399d285f1827527ab88e88e6f44f6456" +checksum = "412e2cf22cb560469db5b211c594ff9dcd490c6964e284ea64eddffe41c2249c" dependencies = [ "miette", "num", @@ -2342,6 +3343,15 @@ dependencies = [ "winnow", ] +[[package]] +name = "kstring" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" +dependencies = [ + "static_assertions", +] + [[package]] name = "lazy-regex" version = "3.4.1" @@ -2385,9 +3395,7 @@ checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", - "libssh2-sys", "libz-sys", - "openssl-sys", "pkg-config", ] @@ -2408,20 +3416,6 @@ dependencies = [ "redox_syscall", ] -[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - [[package]] name = "libz-sys" version = "1.1.21" @@ -2561,6 +3555,17 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "maybe-async" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "md-5" version = "0.10.6" @@ -2577,6 +3582,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + [[package]] name = "miette" version = "7.4.0" @@ -2679,7 +3693,7 @@ dependencies = [ "filetime", "flate2", "fslock", - "git2", + "gix", "glob", "globset", "heck 0.5.0", @@ -2823,9 +3837,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" dependencies = [ "libc", "log", @@ -2998,9 +4012,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" dependencies = [ "bitflags", "cfg-if", @@ -3347,6 +4361,15 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3427,6 +4450,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prodash" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a266d8d6020c61a437be704c5e618037588e1985c7dbb7bf8d265db84cffe325" +dependencies = [ + "bytesize", + "human_format", + "log", + "parking_lot", +] + [[package]] name = "quick-xml" version = "0.37.2" @@ -4230,6 +5265,12 @@ dependencies = [ "digest", ] +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + [[package]] name = "sha2" version = "0.10.8" @@ -4382,6 +5423,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.10.0" @@ -5006,6 +6053,15 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +[[package]] +name = "uluru" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c8a2469e56e6e5095c82ccd3afb98dad95f7af7929aab6d8ba8d6e0f73657da" +dependencies = [ + "arrayvec 0.7.6", +] + [[package]] name = "unic-char-property" version = "0.9.0" @@ -5075,12 +6131,27 @@ dependencies = [ "unic-common", ] +[[package]] +name = "unicode-bom" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" + [[package]] name = "unicode-ident" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -5238,7 +6309,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983" dependencies = [ - "arrayvec", + "arrayvec 0.5.2", "utf8parse", "vte_generate_state_changes", ] diff --git a/Cargo.toml b/Cargo.toml index 6bcd11341e..5ae96439b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,7 +76,6 @@ eyre = "0.6" filetime = "0.2" flate2 = "1" fslock = "0.2.1" -git2 = "<1" glob = "0.3" globset = "0.4" heck = "0.5" @@ -148,6 +147,11 @@ xx = { version = "2", features = ["glob"] } xz2 = "0.1" zip = { version = "2", default-features = false, features = ["deflate"] } zstd = "0.13" +gix = { version = "<1", features = [ + "worktree-mutation", + "blocking-network-client", + "blocking-http-transport-reqwest", +] } [target.'cfg(unix)'.dependencies] exec = "0.3" @@ -181,8 +185,17 @@ test-log = "0.2" [features] default = ["native-tls", "vfox/vendored-lua"] -native-tls = ["reqwest/native-tls", "ubi/native-tls"] -rustls = ["reqwest/rustls-tls", "self_update/rustls", "ubi/rustls-tls"] +native-tls = [ + "reqwest/native-tls", + "ubi/native-tls", + "gix/blocking-http-transport-reqwest-native-tls", +] +rustls = [ + "reqwest/rustls-tls", + "self_update/rustls", + "ubi/rustls-tls", + "gix/blocking-http-transport-reqwest-rust-tls", +] rustls-native-roots = [ "reqwest/rustls-tls-native-roots", "self_update/rustls", diff --git a/schema/mise.json b/schema/mise.json index 4e80643a6d..b97250da27 100644 --- a/schema/mise.json +++ b/schema/mise.json @@ -433,6 +433,11 @@ "description": "Timeout in seconds for HTTP requests to fetch new tool versions in mise.", "type": "string" }, + "gix": { + "default": true, + "description": "Use gix for git operations, set to false to shell out to git.", + "type": "boolean" + }, "global_config_file": { "description": "Path to the global mise config file. Default is `~/.config/mise/config.toml`. This must be an env var.", "type": "string" diff --git a/scripts/build-tarball.ps1 b/scripts/build-tarball.ps1 index 2c4b68722d..0e61dbb47d 100755 --- a/scripts/build-tarball.ps1 +++ b/scripts/build-tarball.ps1 @@ -6,7 +6,7 @@ $Version = ./scripts/get-version.ps1 $BaseName = "mise-v$Version-$Env:OS-$Env:ARCH" # TODO: use "serious" feature -cargo build --release --features openssl/vendored,git2/vendored-libgit2,git2/vendored-openssl --target "$Target" +cargo build --release --features openssl/vendored --target "$Target" mkdir -p dist/mise/bin cp "target/$Target/release/mise.exe" dist/mise/bin/mise.exe cp README.md dist/mise/README.md diff --git a/scripts/build-tarball.sh b/scripts/build-tarball.sh index f03f529b55..ce371a9791 100755 --- a/scripts/build-tarball.sh +++ b/scripts/build-tarball.sh @@ -71,11 +71,11 @@ case "$os-$arch" in esac if command -v cross >/dev/null; then - cross build --profile=serious --target "$RUST_TRIPLE" --features openssl/vendored,git2/vendored-libgit2,git2/vendored-openssl + cross build --profile=serious --target "$RUST_TRIPLE" --features openssl/vendored elif command -v zig >/dev/null; then - cargo zigbuild --profile=serious --target "$RUST_TRIPLE" --features openssl/vendored,git2/vendored-libgit2,git2/vendored-openssl + cargo zigbuild --profile=serious --target "$RUST_TRIPLE" --features openssl/vendored else - cargo build --profile=serious --target "$RUST_TRIPLE" --features openssl/vendored,git2/vendored-libgit2,git2/vendored-openssl + cargo build --profile=serious --target "$RUST_TRIPLE" --features openssl/vendored fi mkdir -p dist/mise/bin mkdir -p dist/mise/man/man1 diff --git a/settings.toml b/settings.toml index 7102b0a7bf..d9765b3a74 100644 --- a/settings.toml +++ b/settings.toml @@ -365,6 +365,17 @@ default = "5s" description = "Timeout in seconds for HTTP requests to fetch new tool versions in mise." aliases = ["fetch_remote_version_timeout"] +[gix] +env = "MISE_GIX" +type = "Bool" +hide = true +default = true +description = "Use gix for git operations, set to false to shell out to git." +docs = """ +Use gix for git operations. This is generally faster but may not be as compatible if the +system's gix is not the same version as the one used by mise. +""" + [global_config_file] env = "MISE_GLOBAL_CONFIG_FILE" type = "Path" @@ -487,6 +498,7 @@ hide = true [libgit2] env = "MISE_LIBGIT2" type = "Bool" +hide = true default = true description = "Use libgit2 for git operations, set to false to shell out to git." docs = """ diff --git a/src/env.rs b/src/env.rs index bb543dc80e..a3040d2c18 100644 --- a/src/env.rs +++ b/src/env.rs @@ -151,9 +151,6 @@ pub static MISE_BIN_NAME: Lazy<&str> = Lazy::new(|| filename(&ARGV0)); pub static MISE_LOG_FILE: Lazy> = Lazy::new(|| var_path("MISE_LOG_FILE")); pub static MISE_LOG_FILE_LEVEL: Lazy> = Lazy::new(log_file_level); -pub static HTTP_PROXY: Lazy> = - Lazy::new(|| var("https_proxy").or_else(|_| var("http_proxy")).ok()); - pub static __USAGE: Lazy> = Lazy::new(|| var("__USAGE").ok()); // true if running inside a shim diff --git a/src/git.rs b/src/git.rs index 0fa820ff31..c6358da33c 100644 --- a/src/git.rs +++ b/src/git.rs @@ -1,10 +1,9 @@ -use crate::env; use std::fmt::Debug; use std::path::{Path, PathBuf}; use duct::Expression; use eyre::{eyre, Result, WrapErr}; -use git2::{FetchOptions, ProxyOptions}; +use gix::{self}; use once_cell::sync::OnceCell; use xx::file; @@ -16,7 +15,7 @@ use crate::ui::progress_report::SingleReport; pub struct Git { pub dir: PathBuf, - pub repo: OnceCell, + pub repo: OnceCell, } macro_rules! git_cmd { @@ -47,14 +46,10 @@ impl Git { } } - pub fn repo(&self) -> Result<&git2::Repository> { + pub fn repo(&self) -> Result<&gix::Repository> { self.repo.get_or_try_init(|| { - // if !SETTINGS.libgit2 { - // trace!("libgit2 is disabled"); - // return Err(eyre!("libgit2 is disabled")); - // } - trace!("opening git repository via libgit2 at {:?}", self.dir); - git2::Repository::open(&self.dir) + trace!("opening git repository via gix at {:?}", self.dir); + gix::open(&self.dir) .wrap_err_with(|| format!("failed to open git repository at {:?}", self.dir)) .inspect_err(|err| warn!("{err:#}")) }) @@ -64,29 +59,6 @@ impl Git { self.dir.join(".git").is_dir() } - // pub fn update_libgit2( - // &self, - // repo: &git2::Repository, - // gitref: &str, - // ) -> Result<(String, String)> { - // let mut fetch_options = get_fetch_options()?; - // let remote_name = "origin"; - // let mut remote = repo.find_remote(remote_name)?; - // remote.fetch(&[gitref], Some(&mut fetch_options), None)?; - // let prev_rev = self.current_sha()?; - // let refname = format!("{remote_name}/{gitref}"); - // let (obj, reference) = repo.revparse_ext(&refname)?; - // repo.checkout_tree(&obj, None)?; - // let commit = obj.peel_to_commit()?; - // repo.branch(gitref, &commit, true)?; - // if let Some(reference) = reference.and_then(|r| r.name().map(|s| s.to_string())) { - // repo.set_head(&reference)?; - // } - // let post_rev = self.current_sha()?; - // touch_dir(&self.dir)?; - // Ok((prev_rev, post_rev)) - // } - pub fn update(&self, gitref: Option) -> Result<(String, String)> { let gitref = gitref.map_or_else(|| self.current_branch(), Ok)?; self.update_ref(gitref, false) @@ -98,14 +70,6 @@ impl Git { fn update_ref(&self, gitref: String, is_tag_ref: bool) -> Result<(String, String)> { debug!("updating {} to {}", self.dir.display(), gitref); - // if SETTINGS.libgit2 { - // if let Ok(repo) = self.repo() { - // match self.update_libgit2(repo, &gitref) { - // Ok(res) => return Ok(res), - // Err(err) => warn!("libgit2 failed: {err}"), - // } - // } - // } let exec = |cmd: Expression| match cmd.stderr_to_stdout().stdout_capture().unchecked().run() { Ok(res) => { @@ -157,15 +121,16 @@ impl Git { if let Some(parent) = self.dir.parent() { file::mkdirp(parent)?; } - if SETTINGS.libgit2 { - if let Err(err) = git2::build::RepoBuilder::new() - .fetch_options(get_fetch_options()?) - .clone(url, &self.dir) - { - warn!("git clone failed: {err:#}"); - } else { - return Ok(()); - } + if SETTINGS.libgit2 || SETTINGS.gix { + let mut prepare_clone = gix::prepare_clone(url, &self.dir)?; + + let (mut prepare_checkout, _) = prepare_clone + .fetch_then_checkout(gix::progress::Discard, &gix::interrupt::IS_INTERRUPTED)?; + + prepare_checkout + .main_worktree(gix::progress::Discard, &gix::interrupt::IS_INTERRUPTED)?; + + return Ok(()); } match get_git_version() { Ok(version) => trace!("git version: {}", version), @@ -192,12 +157,11 @@ impl Git { pub fn current_branch(&self) -> Result { let dir = &self.dir; if let Ok(repo) = self.repo() { - let branch = repo - .head() - .wrap_err_with(|| format!("failed to get current branch in {dir:?}"))? - .shorthand() - .unwrap() - .to_string(); + let head = repo.head()?; + let branch = head + .referent_name() + .map(|name| name.shorten().to_string()) + .unwrap_or_else(|| head.id().unwrap().to_string()); debug!("current branch for {dir:?}: {branch}"); return Ok(branch); } @@ -209,8 +173,8 @@ impl Git { let dir = &self.dir; if let Ok(repo) = self.repo() { let head = repo.head()?; - let head = head.peel_to_commit()?; - let sha = head.id().to_string(); + let id = head.id(); + let sha = id.unwrap().to_string(); debug!("current sha for {dir:?}: {sha}"); return Ok(sha); } @@ -223,8 +187,8 @@ impl Git { let dir = &self.dir; if let Ok(repo) = self.repo() { let head = repo.head()?; - let head = head.peel_to_commit()?; - let sha = head.as_object().short_id()?.as_str().unwrap().to_string(); + let id = head.id(); + let sha = id.unwrap().to_string()[..7].to_string(); debug!("current sha for {dir:?}: {sha}"); return Ok(sha); } @@ -237,7 +201,7 @@ impl Git { let dir = &self.dir; if let Ok(repo) = self.repo() { let head = repo.head()?; - let head = head.shorthand().unwrap().to_string(); + let head = head.name().shorten().to_string(); debug!("current abbrev ref for {dir:?}: {head}"); return Ok(head); } @@ -252,10 +216,12 @@ impl Git { return None; } if let Ok(repo) = self.repo() { - let remote = repo.find_remote("origin").ok()?; - let url = remote.url()?; - trace!("remote url for {dir:?}: {url}"); - return Some(url.to_string()); + if let Ok(remote) = repo.find_remote("origin") { + if let Some(url) = remote.url(gix::remote::Direction::Fetch) { + trace!("remote url for {dir:?}: {url}"); + return Some(url.to_string()); + } + } } let res = git_cmd_read!(&self.dir, "config", "--get", "remote.origin.url"); match res { @@ -289,16 +255,6 @@ impl Git { } } -fn get_fetch_options() -> Result> { - let mut fetch_options = FetchOptions::new(); - if let Some(proxy_url) = env::HTTP_PROXY.as_ref() { - let mut proxy_options = ProxyOptions::new(); - proxy_options.url(proxy_url); - fetch_options.proxy_options(proxy_options); - } - Ok(fetch_options) -} - fn get_git_version() -> Result { let version = cmd!("git", "--version").read()?; Ok(version.trim().into()) @@ -309,25 +265,3 @@ impl Debug for Git { f.debug_struct("Git").field("dir", &self.dir).finish() } } - -// #[cfg(test)] -// mod tests { -// use tempfile::tempdir; -// -// use super::*; -// -// #[test] -// fn test_clone_and_update() { -// let dir = tempdir().unwrap().into_path(); -// let git = Git::new(dir); -// git.clone("https://github.com/mise-plugins/rtx-tiny") -// .unwrap(); -// let prev_rev = "c85ab2bea15e8b785592ce1a75db341e38ac4d33".to_string(); -// let latest = git.current_sha().unwrap(); -// let update_result = git.update(Some(prev_rev.clone())).unwrap(); -// assert_eq!(update_result, (latest.to_string(), prev_rev.to_string())); -// assert_str_eq!(git.current_sha_short().unwrap(), "c85ab2b"); -// let update_result = git.update(None).unwrap(); -// assert_eq!(update_result, (prev_rev, latest)); -// } -// }