diff --git a/Cargo.lock b/Cargo.lock index 7e18dc05..fa36091e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -320,7 +320,7 @@ dependencies = [ "clap-cargo", "clap-verbosity-flag", "directories", - "git2", + "gix 0.52.0", "handlebars", "human-panic", "ignore", @@ -386,7 +386,6 @@ version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "jobserver", "libc", ] @@ -465,6 +464,15 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.0" @@ -733,6 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", + "libz-ng-sys", "miniz_oxide", ] @@ -861,64 +870,104 @@ dependencies = [ ] [[package]] -name = "git2" -version = "0.17.2" +name = "gix" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" +checksum = "275b1bfa0d6f6ed31a2e2e878a4539f4994eac8840546283ab3aebbd8fcaa42d" dependencies = [ - "bitflags 1.3.2", - "libc", - "libgit2-sys", + "gix-actor 0.24.2", + "gix-attributes 0.16.0", + "gix-commitgraph 0.18.2", + "gix-config 0.26.2", + "gix-credentials 0.17.1", + "gix-date", + "gix-diff 0.33.1", + "gix-discover 0.22.1", + "gix-features 0.32.1", + "gix-filter 0.2.0", + "gix-fs 0.4.1", + "gix-glob 0.10.2", + "gix-hash 0.11.4", + "gix-hashtable 0.2.4", + "gix-ignore 0.5.1", + "gix-index 0.21.1", + "gix-lock 7.0.2", + "gix-mailmap 0.16.1", + "gix-negotiate 0.5.1", + "gix-object 0.33.2", + "gix-odb 0.50.2", + "gix-pack 0.40.2", + "gix-path 0.8.4", + "gix-prompt 0.5.5", + "gix-protocol", + "gix-ref 0.33.3", + "gix-refspec 0.14.1", + "gix-revision 0.18.1", + "gix-sec 0.8.4", + "gix-tempfile 7.0.2", + "gix-trace", + "gix-transport", + "gix-traverse 0.30.1", + "gix-url 0.21.1", + "gix-utils", + "gix-validate 0.7.7", + "gix-worktree 0.23.1", "log", - "url", + "once_cell", + "reqwest", + "signal-hook", + "smallvec", + "thiserror", + "unicode-normalization", ] [[package]] name = "gix" -version = "0.50.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "275b1bfa0d6f6ed31a2e2e878a4539f4994eac8840546283ab3aebbd8fcaa42d" +checksum = "a35ed1401a11506b45361746507a7c94c546574ddd7dfc2717f8941e30070254" dependencies = [ - "gix-actor", - "gix-attributes", - "gix-commitgraph", - "gix-config", - "gix-credentials", + "gix-actor 0.25.0", + "gix-attributes 0.17.0", + "gix-commitgraph 0.19.0", + "gix-config 0.28.0", + "gix-credentials 0.18.0", "gix-date", - "gix-diff", - "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-prompt", - "gix-protocol", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-sec", - "gix-tempfile", + "gix-diff 0.34.0", + "gix-discover 0.23.0", + "gix-features 0.33.0", + "gix-filter 0.3.0", + "gix-fs 0.5.0", + "gix-glob 0.11.0", + "gix-hash 0.12.0", + "gix-hashtable 0.3.0", + "gix-ignore 0.6.0", + "gix-index 0.22.0", + "gix-lock 8.0.0", + "gix-mailmap 0.17.0", + "gix-negotiate 0.6.0", + "gix-object 0.35.0", + "gix-odb 0.51.0", + "gix-pack 0.41.0", + "gix-path 0.9.0", + "gix-pathspec", + "gix-prompt 0.6.0", + "gix-ref 0.35.0", + "gix-refspec 0.16.0", + "gix-revision 0.20.0", + "gix-sec 0.9.0", + "gix-submodule", + "gix-tempfile 8.0.0", "gix-trace", - "gix-transport", - "gix-traverse", - "gix-url", + "gix-traverse 0.31.0", + "gix-url 0.22.0", "gix-utils", - "gix-validate", - "gix-worktree", + "gix-validate 0.8.0", + "gix-worktree 0.24.0", + "gix-worktree-state", "log", "once_cell", - "reqwest", + "parking_lot", "signal-hook", "smallvec", "thiserror", @@ -939,6 +988,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-actor" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f8a773b5385e9d2f88bd879fb763ec1212585f6d630ebe13adb7bac93bce975" +dependencies = [ + "bstr 1.6.2", + "btoi", + "gix-date", + "itoa", + "thiserror", + "winnow", +] + [[package]] name = "gix-attributes" version = "0.16.0" @@ -946,8 +1009,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63a134a674e39e238bd273326a9815296cc71f867ad5466518da71392cff98ce" dependencies = [ "bstr 1.6.2", - "gix-glob", - "gix-path", + "gix-glob 0.10.2", + "gix-path 0.8.4", + "gix-quote", + "kstring", + "log", + "smallvec", + "thiserror", + "unicode-bom", +] + +[[package]] +name = "gix-attributes" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1ecae08f2625d8abcd27570fa2f9c2fcf01a1cd968a8d90858e63f8e08211a3" +dependencies = [ + "bstr 1.6.2", + "gix-glob 0.11.0", + "gix-path 0.9.0", "gix-quote", "kstring", "log", @@ -991,8 +1071,22 @@ checksum = "8219fe6f39588a29dbfb8d1c244b07ee653126edc5b6f3860752c3b5454fa10b" dependencies = [ "bstr 1.6.2", "gix-chunk", - "gix-features", - "gix-hash", + "gix-features 0.32.1", + "gix-hash 0.11.4", + "memmap2", + "thiserror", +] + +[[package]] +name = "gix-commitgraph" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3845b3c8722a0e97d9d593c05d384bb1275a5865f1cd967523a3780ffc93168e" +dependencies = [ + "bstr 1.6.2", + "gix-chunk", + "gix-features 0.33.0", + "gix-hash 0.12.0", "memmap2", "thiserror", ] @@ -1004,12 +1098,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2135b921a699a4c36167148193bea23c653a16ef0686f6a280e383469709a773" dependencies = [ "bstr 1.6.2", - "gix-config-value", - "gix-features", - "gix-glob", - "gix-path", - "gix-ref", - "gix-sec", + "gix-config-value 0.12.5", + "gix-features 0.32.1", + "gix-glob 0.10.2", + "gix-path 0.8.4", + "gix-ref 0.33.3", + "gix-sec 0.8.4", + "log", + "memchr", + "once_cell", + "smallvec", + "thiserror", + "unicode-bom", + "winnow", +] + +[[package]] +name = "gix-config" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a312d120231dc8d5a2e34928a9a2098c1d3dbad76f0660ee38d0b1a87de5271" +dependencies = [ + "bstr 1.6.2", + "gix-config-value 0.13.0", + "gix-features 0.33.0", + "gix-glob 0.11.0", + "gix-path 0.9.0", + "gix-ref 0.35.0", + "gix-sec 0.9.0", "log", "memchr", "once_cell", @@ -1027,7 +1143,20 @@ checksum = "6e874f41437441c02991dcea76990b9058fadfc54b02ab4dd06ab2218af43897" dependencies = [ "bitflags 2.4.0", "bstr 1.6.2", - "gix-path", + "gix-path 0.8.4", + "libc", + "thiserror", +] + +[[package]] +name = "gix-config-value" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901e184f3d4f99bf015ca13b5ccacb09e26b400f198fe2066651089e2c490680" +dependencies = [ + "bitflags 2.4.0", + "bstr 1.6.2", + "gix-path 0.9.0", "libc", "thiserror", ] @@ -1040,11 +1169,27 @@ checksum = "307d91ec5f7c8e9bfaa217fe30c2e0099101cbe83dbed27a222dbb6def38725f" dependencies = [ "bstr 1.6.2", "gix-command", - "gix-config-value", - "gix-path", - "gix-prompt", - "gix-sec", - "gix-url", + "gix-config-value 0.12.5", + "gix-path 0.8.4", + "gix-prompt 0.5.5", + "gix-sec 0.8.4", + "gix-url 0.21.1", + "thiserror", +] + +[[package]] +name = "gix-credentials" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2988e917f7ee4a99072354d5885ca14c9e7039de8246e96e300ab3e5060cad19" +dependencies = [ + "bstr 1.6.2", + "gix-command", + "gix-config-value 0.13.0", + "gix-path 0.9.0", + "gix-prompt 0.6.0", + "gix-sec 0.9.0", + "gix-url 0.22.0", "thiserror", ] @@ -1066,8 +1211,20 @@ version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a49d7a9a9ed5ec3428c3061da45d0fc5f50b3c07b91ea4e7ec4959668f25f6c" dependencies = [ - "gix-hash", - "gix-object", + "gix-hash 0.11.4", + "gix-object 0.33.2", + "imara-diff", + "thiserror", +] + +[[package]] +name = "gix-diff" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016be5f0789da595b61d15a862476be0cbae8fd29e2c91d66770fdd8df145773" +dependencies = [ + "gix-hash 0.12.0", + "gix-object 0.35.0", "imara-diff", "thiserror", ] @@ -1080,10 +1237,25 @@ checksum = "041480eb03d8aa0894d9b73d25d182d51bc4d0ea8925a6ee0c971262bbc7715e" dependencies = [ "bstr 1.6.2", "dunce", - "gix-hash", - "gix-path", - "gix-ref", - "gix-sec", + "gix-hash 0.11.4", + "gix-path 0.8.4", + "gix-ref 0.33.3", + "gix-sec 0.8.4", + "thiserror", +] + +[[package]] +name = "gix-discover" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b74760d912716b287357dae5654ad84be12a2a75a721f00b58ecdd65496e024" +dependencies = [ + "bstr 1.6.2", + "dunce", + "gix-hash 0.12.0", + "gix-path 0.9.0", + "gix-ref 0.35.0", + "gix-sec 0.9.0", "thiserror", ] @@ -1097,7 +1269,7 @@ dependencies = [ "crc32fast", "crossbeam-channel", "flate2", - "gix-hash", + "gix-hash 0.11.4", "gix-trace", "jwalk", "libc", @@ -1109,6 +1281,28 @@ dependencies = [ "walkdir", ] +[[package]] +name = "gix-features" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f77decb545f63a52852578ef5f66ecd71017ffc1983d551d5fa2328d6d9817f" +dependencies = [ + "crc32fast", + "crossbeam-channel", + "flate2", + "gix-hash 0.12.0", + "gix-trace", + "jwalk", + "libc", + "once_cell", + "parking_lot", + "prodash", + "sha1", + "sha1_smol", + "thiserror", + "walkdir", +] + [[package]] name = "gix-filter" version = "0.2.0" @@ -1117,12 +1311,32 @@ checksum = "ef4d4d61f2ab07de4612f8e078d7f1a443c7ab5c40f382784c8eacdf0fd172b9" dependencies = [ "bstr 1.6.2", "encoding_rs", - "gix-attributes", + "gix-attributes 0.16.0", + "gix-command", + "gix-hash 0.11.4", + "gix-object 0.33.2", + "gix-packetline-blocking", + "gix-path 0.8.4", + "gix-quote", + "gix-trace", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-filter" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f5495cdd54f4c3bb05b35a525cd39df1643362d917a7e03f112564c2825feb4" +dependencies = [ + "bstr 1.6.2", + "encoding_rs", + "gix-attributes 0.17.0", "gix-command", - "gix-hash", - "gix-object", + "gix-hash 0.12.0", + "gix-object 0.35.0", "gix-packetline-blocking", - "gix-path", + "gix-path 0.9.0", "gix-quote", "gix-trace", "smallvec", @@ -1135,7 +1349,16 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d5b6e9d34a2c61ea4a02bbca94c409ab6dbbca1348cbb67298cd7fed8758761" dependencies = [ - "gix-features", + "gix-features 0.32.1", +] + +[[package]] +name = "gix-fs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d5089f3338647776733a75a800a664ab046f56f21c515fa4722e395f877ef8" +dependencies = [ + "gix-features 0.33.0", ] [[package]] @@ -1146,8 +1369,20 @@ checksum = "b7255c717f49a556fa5029f6d9f2b3c008b4dd016c87f23c2ab8ca9636d5fade" dependencies = [ "bitflags 2.4.0", "bstr 1.6.2", - "gix-features", - "gix-path", + "gix-features 0.32.1", + "gix-path 0.8.4", +] + +[[package]] +name = "gix-glob" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c753299d14a29ca06d7adc8464c16f1786eb97bc9a44a796ad0a37f57235a494" +dependencies = [ + "bitflags 2.4.0", + "bstr 1.6.2", + "gix-features 0.33.0", + "gix-path 0.9.0", ] [[package]] @@ -1160,13 +1395,34 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-hash" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d4796bac3aaf0c2f8bea152ca924ae3bdc5f135caefe6431116bcd67e98eab9" +dependencies = [ + "faster-hex", + "thiserror", +] + [[package]] name = "gix-hashtable" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "385f4ce6ecf3692d313ca3aa9bd3b3d8490de53368d6d94bedff3af8b6d9c58d" dependencies = [ - "gix-hash", + "gix-hash 0.11.4", + "hashbrown 0.14.0", + "parking_lot", +] + +[[package]] +name = "gix-hashtable" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ad1b70efd1e77c32729d5a522f0c855e9827242feb10318e1acaf2259222c0" +dependencies = [ + "gix-hash 0.12.0", "hashbrown 0.14.0", "parking_lot", ] @@ -1178,8 +1434,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a88b95ceb3bc45abcab6eb55ef4e0053e58b4df0712d3f9aec7d0ca990952603" dependencies = [ "bstr 1.6.2", - "gix-glob", - "gix-path", + "gix-glob 0.10.2", + "gix-path 0.8.4", + "unicode-bom", +] + +[[package]] +name = "gix-ignore" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b355098421f5cc91a0e5f1ef3600ae250c13b7c3c472b18c361897c6081bfbb1" +dependencies = [ + "bstr 1.6.2", + "gix-glob 0.11.0", + "gix-path 0.9.0", "unicode-bom", ] @@ -1194,12 +1462,35 @@ dependencies = [ "btoi", "filetime", "gix-bitmap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-traverse", + "gix-features 0.32.1", + "gix-fs 0.4.1", + "gix-hash 0.11.4", + "gix-lock 7.0.2", + "gix-object 0.33.2", + "gix-traverse 0.30.1", + "itoa", + "memmap2", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-index" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9738fc58ca30e232c7b1be8e8ab52b072979acb9bf3fa97662b5b23c0c6fbca" +dependencies = [ + "bitflags 2.4.0", + "bstr 1.6.2", + "btoi", + "filetime", + "gix-bitmap", + "gix-features 0.33.0", + "gix-fs 0.5.0", + "gix-hash 0.12.0", + "gix-lock 8.0.0", + "gix-object 0.35.0", + "gix-traverse 0.31.0", "itoa", "memmap2", "smallvec", @@ -1212,7 +1503,18 @@ version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e82ec23c8a281f91044bf3ed126063b91b59f9c9340bf0ae746f385cc85a6fa" dependencies = [ - "gix-tempfile", + "gix-tempfile 7.0.2", + "gix-utils", + "thiserror", +] + +[[package]] +name = "gix-lock" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de4363023577b31906b476b34eefbf76931363ec574f88b5c7b6027789f1e3ce" +dependencies = [ + "gix-tempfile 8.0.0", "gix-utils", "thiserror", ] @@ -1224,7 +1526,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc0dbbf35d29639770af68d7ff55924d83786c8924b0e6a1766af1a98b7d58b" dependencies = [ "bstr 1.6.2", - "gix-actor", + "gix-actor 0.24.2", + "gix-date", + "thiserror", +] + +[[package]] +name = "gix-mailmap" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244a4a6f08e8104110675de649ccd20fe1d1116783063920e19aa7da197a4ad0" +dependencies = [ + "bstr 1.6.2", + "gix-actor 0.25.0", "gix-date", "thiserror", ] @@ -1236,11 +1550,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce0061b7ae867e830c77b1ecfc5875f0d042aebb3d7e6014d04fd86ca6c71d59" dependencies = [ "bitflags 2.4.0", - "gix-commitgraph", + "gix-commitgraph 0.18.2", "gix-date", - "gix-hash", - "gix-object", - "gix-revwalk", + "gix-hash 0.11.4", + "gix-object 0.33.2", + "gix-revwalk 0.4.1", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-negotiate" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0b0ea711559f843b8286cdf71ea421560c072120fae35a949bcf6b068b73745" +dependencies = [ + "bitflags 2.4.0", + "gix-commitgraph 0.19.0", + "gix-date", + "gix-hash 0.12.0", + "gix-object 0.35.0", + "gix-revwalk 0.6.0", "smallvec", "thiserror", ] @@ -1253,11 +1583,11 @@ checksum = "bfdd87520c71a19afecfa616863a4b761621074878f5a3999243b3e37e233943" dependencies = [ "bstr 1.6.2", "btoi", - "gix-actor", + "gix-actor 0.24.2", "gix-date", - "gix-features", - "gix-hash", - "gix-validate", + "gix-features 0.32.1", + "gix-hash 0.11.4", + "gix-validate 0.7.7", "hex", "itoa", "nom", @@ -1265,6 +1595,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-object" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4283b7b5e9438afe2e3183e9acd1c77e750800937bb56c06b750822d2ff6d95" +dependencies = [ + "bstr 1.6.2", + "btoi", + "gix-actor 0.25.0", + "gix-date", + "gix-features 0.33.0", + "gix-hash 0.12.0", + "gix-validate 0.8.0", + "itoa", + "smallvec", + "thiserror", + "winnow", +] + [[package]] name = "gix-odb" version = "0.50.2" @@ -1273,11 +1622,30 @@ checksum = "e827dbda6d3dabadb94cd437d0e0fe8c314a60d136a3235fc6f5bf7b96b976ac" dependencies = [ "arc-swap", "gix-date", - "gix-features", - "gix-hash", - "gix-object", - "gix-pack", - "gix-path", + "gix-features 0.32.1", + "gix-hash 0.11.4", + "gix-object 0.33.2", + "gix-pack 0.40.2", + "gix-path 0.8.4", + "gix-quote", + "parking_lot", + "tempfile", + "thiserror", +] + +[[package]] +name = "gix-odb" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dd295ca055d8270de23b6037176b03782de753f75c84dabb7713f7d7e229fd" +dependencies = [ + "arc-swap", + "gix-date", + "gix-features 0.33.0", + "gix-hash 0.12.0", + "gix-object 0.35.0", + "gix-pack 0.41.0", + "gix-path 0.9.0", "gix-quote", "parking_lot", "tempfile", @@ -1292,14 +1660,37 @@ checksum = "46f029a4dce9ac91da35c968c3abdcae573b3e52c123be86cbab3011599de533" dependencies = [ "clru", "gix-chunk", - "gix-diff", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-traverse", + "gix-diff 0.33.1", + "gix-features 0.32.1", + "gix-hash 0.11.4", + "gix-hashtable 0.2.4", + "gix-object 0.33.2", + "gix-path 0.8.4", + "gix-tempfile 7.0.2", + "gix-traverse 0.30.1", + "memmap2", + "parking_lot", + "smallvec", + "thiserror", + "uluru", +] + +[[package]] +name = "gix-pack" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e645c38138216b9de2f6279bfb1b8567de6f4539f8fa2761eea961d991f448" +dependencies = [ + "clru", + "gix-chunk", + "gix-diff 0.34.0", + "gix-features 0.33.0", + "gix-hash 0.12.0", + "gix-hashtable 0.3.0", + "gix-object 0.35.0", + "gix-path 0.9.0", + "gix-tempfile 8.0.0", + "gix-traverse 0.31.0", "memmap2", "parking_lot", "smallvec", @@ -1342,6 +1733,34 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-path" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "764b31ac54472e796f08be376eaeea3e30800949650566620809659d39969dbd" +dependencies = [ + "bstr 1.6.2", + "gix-trace", + "home", + "once_cell", + "thiserror", +] + +[[package]] +name = "gix-pathspec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ba6662a29a6332926494542f6144ee87a59df3c70a4c680ebd235b646d7866" +dependencies = [ + "bitflags 2.4.0", + "bstr 1.6.2", + "gix-attributes 0.17.0", + "gix-config-value 0.13.0", + "gix-glob 0.11.0", + "gix-path 0.9.0", + "thiserror", +] + [[package]] name = "gix-prompt" version = "0.5.5" @@ -1349,7 +1768,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c22decaf4a063ccae2b2108820c8630c01bd6756656df3fe464b32b8958a5ea" dependencies = [ "gix-command", - "gix-config-value", + "gix-config-value 0.12.5", + "parking_lot", + "rustix", + "thiserror", +] + +[[package]] +name = "gix-prompt" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ebf6f126413908bfbdc27bf69f6f8b94b674457546fab8ba613be22b917d33" +dependencies = [ + "gix-command", + "gix-config-value 0.13.0", "parking_lot", "rustix", "thiserror", @@ -1363,10 +1795,10 @@ checksum = "0f8cf8b48ad5510a6ea3c8b529f51fd0f31009a2e46579f3a0ed917669035170" dependencies = [ "bstr 1.6.2", "btoi", - "gix-credentials", + "gix-credentials 0.17.1", "gix-date", - "gix-features", - "gix-hash", + "gix-features 0.32.1", + "gix-hash 0.11.4", "gix-transport", "maybe-async", "nom", @@ -1390,21 +1822,42 @@ version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25db11edd78bf33043d1969fff51c567a4b30edd77ab44f6f8eb460a4c14985d" dependencies = [ - "gix-actor", + "gix-actor 0.24.2", "gix-date", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-validate", + "gix-features 0.32.1", + "gix-fs 0.4.1", + "gix-hash 0.11.4", + "gix-lock 7.0.2", + "gix-object 0.33.2", + "gix-path 0.8.4", + "gix-tempfile 7.0.2", + "gix-validate 0.7.7", "memmap2", "nom", "thiserror", ] +[[package]] +name = "gix-ref" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993ce5c448a94038b8da1a8969c0facd6c1fbac509fa013344c580458f41527d" +dependencies = [ + "gix-actor 0.25.0", + "gix-date", + "gix-features 0.33.0", + "gix-fs 0.5.0", + "gix-hash 0.12.0", + "gix-lock 8.0.0", + "gix-object 0.35.0", + "gix-path 0.9.0", + "gix-tempfile 8.0.0", + "gix-validate 0.8.0", + "memmap2", + "thiserror", + "winnow", +] + [[package]] name = "gix-refspec" version = "0.14.1" @@ -1412,9 +1865,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d19a02bf740b326d6c082a7d6f754ebe56eef900986c5e91be7cf000df9ea18d" dependencies = [ "bstr 1.6.2", - "gix-hash", - "gix-revision", - "gix-validate", + "gix-hash 0.11.4", + "gix-revision 0.18.1", + "gix-validate 0.7.7", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-refspec" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3171923a0f9075feae790bb81d824c0c1f91a899df51508705d4957bacd006e" +dependencies = [ + "bstr 1.6.2", + "gix-hash 0.12.0", + "gix-revision 0.20.0", + "gix-validate 0.8.0", "smallvec", "thiserror", ] @@ -1427,10 +1894,26 @@ checksum = "38a13500890435e3b9e7746bceda248646bfc69e259210884c98e29bb7a1aa6f" dependencies = [ "bstr 1.6.2", "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", + "gix-hash 0.11.4", + "gix-hashtable 0.2.4", + "gix-object 0.33.2", + "gix-revwalk 0.4.1", + "thiserror", +] + +[[package]] +name = "gix-revision" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2443886b7c55e73a813f203fe8603b94ac5deb3dfad8812d25e731b81f569f27" +dependencies = [ + "bstr 1.6.2", + "gix-date", + "gix-hash 0.12.0", + "gix-hashtable 0.3.0", + "gix-object 0.35.0", + "gix-revwalk 0.6.0", + "gix-trace", "thiserror", ] @@ -1440,11 +1923,26 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d4cbaf3cfbfde2b81b5ee8b469aff42c34693ce0fe17fc3c244d5085307f2c" dependencies = [ - "gix-commitgraph", + "gix-commitgraph 0.18.2", "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", + "gix-hash 0.11.4", + "gix-hashtable 0.2.4", + "gix-object 0.33.2", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-revwalk" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "362f71e173364f67d02899388c4b3d2f6bac7c16c0f3a9bbc04683f984f59daa" +dependencies = [ + "gix-commitgraph 0.19.0", + "gix-date", + "gix-hash 0.12.0", + "gix-hashtable 0.3.0", + "gix-object 0.35.0", "smallvec", "thiserror", ] @@ -1456,18 +1954,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9615cbd6b456898aeb942cd75e5810c382fbfc48dbbff2fa23ebd2d33dcbe9c7" dependencies = [ "bitflags 2.4.0", - "gix-path", + "gix-path 0.8.4", "libc", "windows", ] +[[package]] +name = "gix-sec" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0debc2e70613a077c257c2bb45ab4f652a550ae1d00bdca356633ea9de88a230" +dependencies = [ + "bitflags 2.4.0", + "gix-path 0.9.0", + "libc", + "windows", +] + +[[package]] +name = "gix-submodule" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71cc3ecd5e2387102aa275fc88fcf36e0f0b9df23a1335bf6255327abbb9bb3f" +dependencies = [ + "bstr 1.6.2", + "gix-config 0.28.0", + "gix-path 0.9.0", + "gix-pathspec", + "gix-refspec 0.16.0", + "gix-url 0.22.0", + "thiserror", +] + [[package]] name = "gix-tempfile" version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa28d567848cec8fdd77d36ad4f5f78ecfaba7d78f647d4f63c8ae1a2cec7243" dependencies = [ - "gix-fs", + "gix-fs 0.4.1", + "libc", + "once_cell", + "parking_lot", + "signal-hook", + "signal-hook-registry", + "tempfile", +] + +[[package]] +name = "gix-tempfile" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea558d3daf3b1d0001052b12218c66c8f84788852791333b633d7eeb6999db1" +dependencies = [ + "gix-fs 0.5.0", "libc", "once_cell", "parking_lot", @@ -1491,12 +2031,12 @@ dependencies = [ "base64", "bstr 1.6.2", "gix-command", - "gix-credentials", - "gix-features", + "gix-credentials 0.17.1", + "gix-features 0.32.1", "gix-packetline", "gix-quote", - "gix-sec", - "gix-url", + "gix-sec 0.8.4", + "gix-url 0.21.1", "reqwest", "thiserror", ] @@ -1507,12 +2047,28 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e12e0fe428394226c37dd686ad64b09a04b569fe157d638b125b4a4c1e7e2df0" dependencies = [ - "gix-commitgraph", + "gix-commitgraph 0.18.2", + "gix-date", + "gix-hash 0.11.4", + "gix-hashtable 0.2.4", + "gix-object 0.33.2", + "gix-revwalk 0.4.1", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-traverse" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beecf2e4d8924cbe0cace0bd396f9b037fdf7db9799d5695fe70dcad959ed067" +dependencies = [ + "gix-commitgraph 0.19.0", "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", + "gix-hash 0.12.0", + "gix-hashtable 0.3.0", + "gix-object 0.35.0", + "gix-revwalk 0.6.0", "smallvec", "thiserror", ] @@ -1524,8 +2080,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4411bdbd1d46b35ae50e84c191660d437f89974e4236627785024be0b577170a" dependencies = [ "bstr 1.6.2", - "gix-features", - "gix-path", + "gix-features 0.32.1", + "gix-path 0.8.4", + "home", + "thiserror", + "url", +] + +[[package]] +name = "gix-url" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6059e15828df32027a7db9097e5a9baf320d2dcc10a4e1598ffe05be8dfd1fa6" +dependencies = [ + "bstr 1.6.2", + "gix-features 0.33.0", + "gix-path 0.9.0", "home", "thiserror", "url", @@ -1550,6 +2120,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-validate" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05cab2b03a45b866156e052aa38619f4ece4adcb2f79978bfc249bc3b21b8c5" +dependencies = [ + "bstr 1.6.2", + "thiserror", +] + [[package]] name = "gix-worktree" version = "0.23.1" @@ -1558,16 +2138,54 @@ checksum = "9f8bb6dd57dc6c9dfa03cc2cf2cc0942edae405eb6dfd1c34dbd2be00a90cab2" dependencies = [ "bstr 1.6.2", "filetime", - "gix-attributes", - "gix-features", - "gix-filter", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-ignore", - "gix-index", - "gix-object", - "gix-path", + "gix-attributes 0.16.0", + "gix-features 0.32.1", + "gix-filter 0.2.0", + "gix-fs 0.4.1", + "gix-glob 0.10.2", + "gix-hash 0.11.4", + "gix-ignore 0.5.1", + "gix-index 0.21.1", + "gix-object 0.33.2", + "gix-path 0.8.4", + "io-close", + "thiserror", +] + +[[package]] +name = "gix-worktree" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38eab0fdd752ecfa50130c127c9f42bd329bf7f4e52872f4ac24c12bbc02baf" +dependencies = [ + "bstr 1.6.2", + "gix-attributes 0.17.0", + "gix-features 0.33.0", + "gix-fs 0.5.0", + "gix-glob 0.11.0", + "gix-hash 0.12.0", + "gix-ignore 0.6.0", + "gix-index 0.22.0", + "gix-object 0.35.0", + "gix-path 0.9.0", +] + +[[package]] +name = "gix-worktree-state" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44629a04d238493f0da657a0eee4d60086f0172c364ca4a71398b1898fda32a6" +dependencies = [ + "bstr 1.6.2", + "gix-features 0.33.0", + "gix-filter 0.3.0", + "gix-fs 0.5.0", + "gix-glob 0.11.0", + "gix-hash 0.12.0", + "gix-index 0.22.0", + "gix-object 0.35.0", + "gix-path 0.9.0", + "gix-worktree 0.24.0", "io-close", "thiserror", ] @@ -1897,15 +2515,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" -[[package]] -name = "jobserver" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.64" @@ -1947,27 +2556,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] -name = "libgit2-sys" -version = "0.15.2+1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a80df2e11fb4a61f4ba2ab42dbe7f74468da143f1a75c74e11dee7c813f694fa" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libz-sys" +name = "libz-ng-sys" version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "3dd9f43e75536a46ee0f92b758f6b63846e594e86638c61a9251338a65baea63" dependencies = [ - "cc", + "cmake", "libc", - "pkg-config", - "vcpkg", ] [[package]] @@ -2248,12 +2843,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2706,6 +3295,27 @@ dependencies = [ "serde", ] +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", + "sha1-asm", +] + +[[package]] +name = "sha1-asm" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba6947745e7f86be3b8af00b7355857085dbdf8901393c89514510eb61f4e21" +dependencies = [ + "cc", +] + [[package]] name = "sha1_smol" version = "1.0.0" @@ -2873,7 +3483,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93b8105f79989496b426b812cdbe61633dcb83f2b0b88b410949dc8b4d3f1c27" dependencies = [ "camino", - "gix", + "gix 0.50.1", "home", "http", "memchr", @@ -3361,12 +3971,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" diff --git a/Cargo.toml b/Cargo.toml index c9cd80df..deceae69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ clap-cargo = { version = "0.10.0", features = ["cargo_metadata"] } ignore = "0.4.18" clap-verbosity-flag = "2.0.0" log = "0.4.17" -git2 = { version = "0.17.0", default-features = false } +gix = { version = "0.52.0", default-features = false, features = ["max-performance"] } tame-index = { version = "0.2", features = ["git", "sparse"] } human-panic = "1.0.3" bugreport = "0.5.0" diff --git a/src/rustdoc_gen.rs b/src/rustdoc_gen.rs index e583a527..0c8ca804 100644 --- a/src/rustdoc_gen.rs +++ b/src/rustdoc_gen.rs @@ -515,45 +515,38 @@ impl RustdocFromGitRevision { config: &mut GlobalConfig, ) -> anyhow::Result { config.shell_status("Cloning", rev)?; - let repo = git2::Repository::discover(source)?; + let repo = gix::discover(source)?; - let rev = repo.revparse_single(rev)?; - let rev_dir = target.join(rev.id().to_string()); + let tree_id = repo.rev_parse_single(&*format!("{rev}^{{tree}}"))?; + let tree_dir = target.join(tree_id.to_string()); - std::fs::create_dir_all(&rev_dir)?; - let tree = rev.peel_to_tree()?; - extract_tree(&repo, tree, &rev_dir)?; + std::fs::create_dir_all(&tree_dir)?; + extract_tree(tree_id, &tree_dir)?; - let path = RustdocFromProjectRoot::new(&rev_dir, target)?; + let path = RustdocFromProjectRoot::new(&tree_dir, target)?; Ok(Self { path }) } } -fn extract_tree( - repo: &git2::Repository, - tree: git2::Tree<'_>, - target: &std::path::Path, -) -> anyhow::Result<()> { - for entry in tree.iter() { - match entry.kind() { - Some(git2::ObjectType::Tree) => { - let object = entry.to_object(repo); - let tree = object.and_then(|o| o.peel_to_tree()); - if let Ok(tree) = tree { - let path = target.join(bytes2str(entry.name_bytes())); - std::fs::create_dir_all(&path)?; - extract_tree(repo, tree, &path)?; - } +fn extract_tree(tree: gix::Id<'_>, target: &std::path::Path) -> anyhow::Result<()> { + for entry in tree.object()?.try_into_tree()?.iter() { + let entry = entry?; + match entry.mode() { + gix::object::tree::EntryMode::Tree => { + let path = target.join(bytes2str(entry.filename())); + std::fs::create_dir_all(&path)?; + extract_tree(entry.id(), &path)?; } - Some(git2::ObjectType::Blob) => { - let object = entry.to_object(repo); - let blob = object.and_then(|o| o.peel_to_blob()); - if let Ok(blob) = blob { - let path = target.join(bytes2str(entry.name_bytes())); - let existing = std::fs::read(&path).ok(); - if existing.as_deref() != Some(blob.content()) { - std::fs::write(&path, blob.content())?; - } + gix::object::tree::EntryMode::Blob | gix::object::tree::EntryMode::BlobExecutable => { + let blob = entry.object()?; + assert!( + blob.kind.is_blob(), + "we are not working on a corrupted repository" + ); + let path = target.join(bytes2str(entry.filename())); + let existing = std::fs::read(&path).ok(); + if existing.as_deref() != Some(&blob.data) { + std::fs::write(&path, &blob.data)?; } } _ => {}