diff --git a/Cargo.lock b/Cargo.lock index 3e7afddcae..20341566de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,9 +133,9 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "arc-swap" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e" +checksum = "a07d1f37ff60921c83bdfc7407723bdefe89b44b98a9b772f225c8f9d67141a6" dependencies = [ "rustversion", ] @@ -365,6 +365,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + [[package]] name = "bytesize" version = "2.3.1" @@ -600,7 +606,7 @@ dependencies = [ "document-features", "mio", "parking_lot", - "rustix 1.1.3", + "rustix 1.1.4", "serde", "signal-hook", "signal-hook-mio", @@ -1039,14 +1045,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.59.0", ] [[package]] @@ -1343,12 +1348,14 @@ dependencies = [ [[package]] name = "gix" -version = "0.78.0" +version = "0.81.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3428a03ace494ae40308bd3df0b37e7eb7403e24389f27abdff30abf2b5adf17" +checksum = "0473c64d9ccbcfb9953a133b47c8b9a335b87ac6c52b983ee4b03d49000b0f3f" dependencies = [ "gix-actor", + "gix-archive", "gix-attributes", + "gix-blame", "gix-command", "gix-commitgraph", "gix-config", @@ -1367,6 +1374,8 @@ dependencies = [ "gix-index", "gix-lock", "gix-mailmap", + "gix-merge", + "gix-negotiate", "gix-object", "gix-odb", "gix-pack", @@ -1388,29 +1397,43 @@ dependencies = [ "gix-utils", "gix-validate", "gix-worktree", + "gix-worktree-state", + "gix-worktree-stream", + "nonempty", "smallvec", "thiserror 2.0.18", ] [[package]] name = "gix-actor" -version = "0.38.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50ce5433eaa46187349e59089eea71b0397caa71991b2fa3e124120426d7d15" +checksum = "0e5e5b518339d5e6718af108fd064d4e9ba33caf728cf487352873d76411df35" dependencies = [ "bstr", "gix-date", - "gix-utils", - "itoa", - "thiserror 2.0.18", + "gix-error", "winnow", ] [[package]] -name = "gix-attributes" +name = "gix-archive" version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f868f013fee0ebb5c85fae848c34a0b9ef7438acfbaec0c82a3cdbd5eac730a0" +checksum = "651c99be11aac9b303483193ae50b45eb6e094da4f5ed797019b03948f51aad6" +dependencies = [ + "bstr", + "gix-date", + "gix-error", + "gix-object", + "gix-worktree-stream", +] + +[[package]] +name = "gix-attributes" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c233d6eaa098c0ca5ce03236fd7a96e27f1abe72fad74b46003fbd11fe49563c" dependencies = [ "bstr", "gix-glob", @@ -1425,27 +1448,47 @@ dependencies = [ [[package]] name = "gix-bitmap" -version = "0.2.15" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e150161b8a75b5860521cb876b506879a3376d3adc857ec7a9d35e7c6a5e531" +checksum = "e7add20f40d060db8c9b1314d499bac6ed7480f33eb113ce3e1cf5d6ff85d989" dependencies = [ + "gix-error", +] + +[[package]] +name = "gix-blame" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77aaf9f7348f4da3ebfbfbbc35fa0d07155d98377856198dde6f695fd648705" +dependencies = [ + "gix-commitgraph", + "gix-date", + "gix-diff", + "gix-error", + "gix-hash", + "gix-object", + "gix-revwalk", + "gix-trace", + "gix-traverse", + "gix-worktree", + "smallvec", "thiserror 2.0.18", ] [[package]] name = "gix-chunk" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e516efaac951ed21115b11d5514b120c26ccb493d0c0b9ea6cc10edf4fdf44" +checksum = "1096b6608fbe5d27fb4984e20f992b4e76fb8c613f6acb87d07c5831b53a6959" dependencies = [ "gix-error", ] [[package]] name = "gix-command" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745bc165b7da500acc26d24888379ae0dfd1ecabe3a47420cdcb92feefb0561d" +checksum = "b849c65a609f50d02f8a2774fe371650b3384a743c79c2a070ce0da49b7fb7da" dependencies = [ "bstr", "gix-path", @@ -1456,22 +1499,23 @@ dependencies = [ [[package]] name = "gix-commitgraph" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0dda2e4d5a61d4a16a780f61f2b7e9406ad1f8da97c35c09ef501f3fdf74de0" +checksum = "3196655fd1443f3c58a48c114aa480be3e4e87b393d7292daaa0d543862eb445" dependencies = [ "bstr", "gix-chunk", "gix-error", "gix-hash", "memmap2", + "nonempty", ] [[package]] name = "gix-config" -version = "0.51.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a153dd4f5789fdf242e19e3f7105f2a114df198570225976fe4a108bac9dee4" +checksum = "08939b4c4ed7a663d0e64be9e1e9bdf23a1fb4fcee1febdf449f12229542e50d" dependencies = [ "bstr", "gix-config-value", @@ -1489,9 +1533,9 @@ dependencies = [ [[package]] name = "gix-config-value" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563361198101cedc975fe5760c91ac2e4126eec22216e81b659b45289feaf1ea" +checksum = "441a300bc3645a1f45cba495b9175f90f47256ce43f2ee161da0031e3ac77c92" dependencies = [ "bitflags 2.10.0", "bstr", @@ -1502,9 +1546,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.13.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12553b32d1da25671f31c0b084bf1e5cb6d5ef529254d04ec33cdc890bd7f687" +checksum = "39acf819aa9fee65e4838a2eec5cb2506e47ebb89e02a5ab9918196e491571ea" dependencies = [ "bstr", "gix-error", @@ -1515,9 +1559,9 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.58.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26bcd367b2c5dbf6bec9ce02ca59eab179fc82cf39f15ec83549ee25c255c99f" +checksum = "88f3b3475e5d3877d7c30c40827cc2441936ce890efc226e5ba4afe3a7ae33f0" dependencies = [ "bstr", "gix-attributes", @@ -1533,15 +1577,16 @@ dependencies = [ "gix-trace", "gix-traverse", "gix-worktree", - "imara-diff", + "imara-diff 0.1.8", + "imara-diff 0.2.0", "thiserror 2.0.18", ] [[package]] name = "gix-dir" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004129e2c93798141d68ff08cb7f1b3d909c0212747fb8b05c8989635ba90a4e" +checksum = "5da4604a360988f0ba8efe6f90093ca5a844f4a7f8e1a3dcda501ec44e600ea9" dependencies = [ "bstr", "gix-discover", @@ -1559,9 +1604,9 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.46.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "950b027b861c6863ddf1b075672ec1ef2006b95c4d12284fc1ec4cdb1ab6639e" +checksum = "c65bd3330fe0cb9d40d875bf862fd5e8ad6fa4164ddbc4842fbeb889c3f0b2c6" dependencies = [ "bstr", "dunce", @@ -1574,19 +1619,20 @@ dependencies = [ [[package]] name = "gix-error" -version = "0.0.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dffc9ca4dfa4f519a3d2cf1c038919160544923577ac60f45bcb602a24d82c6" +checksum = "2e86d01da904d4a9265def43bd42a18c5e6dc7000a73af512946ba14579c9fbd" dependencies = [ "bstr", ] [[package]] name = "gix-features" -version = "0.46.0" +version = "0.46.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a407957e21dc5e6c87086e50e5114a2f9240f9cb11699588a6d900d53cb6c70" +checksum = "752493cd4b1d5eaaa0138a7493f65c96863fefa990fc021e0e519579e389ab20" dependencies = [ + "bytes", "crc32fast", "crossbeam-channel", "gix-path", @@ -1603,9 +1649,9 @@ dependencies = [ [[package]] name = "gix-filter" -version = "0.25.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7240442915cdd74e1f889566695ce0d0c23c7185b13318a1232ce646af0d18ad" +checksum = "d37598282a6566da6fb52667570c7fe0aedcb122ac886724a9e62a2180523e35" dependencies = [ "bstr", "encoding_rs", @@ -1624,9 +1670,9 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.19.0" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba74fa163d3b2ba821d5cd207d55fe3daac3d1099613a8559c812d2b15b3c39a" +checksum = "a964b4aec683eb0bacb87533defa80805bb4768056371a47ab38b00a2d377b72" dependencies = [ "bstr", "fastrand", @@ -1650,9 +1696,9 @@ dependencies = [ [[package]] name = "gix-hash" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8e11ea6bbd0fd4ab4a1c66812dd3cc25921a41315b120f352997725a4c79d6" +checksum = "0fb896a02d9ab96fa518475a5f30ad3952010f801a8de5840f633f4a6b985dfb" dependencies = [ "faster-hex", "gix-features", @@ -1662,9 +1708,9 @@ dependencies = [ [[package]] name = "gix-hashtable" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f1eecdd006390cbed81f105417dbf82a6fe40842022006550f2e32484101da" +checksum = "2664216fc5e89b51e756a4a3ac676315602ce2dac07acf1da959a22038d69b33" dependencies = [ "gix-hash", "hashbrown 0.16.1", @@ -1673,9 +1719,9 @@ dependencies = [ [[package]] name = "gix-ignore" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8953d87c13267e296d547f0fc7eaa8aa8fa5b2a9a34ab1cd5857f25240c7d299" +checksum = "09f915dcf6911e3027537166d34e13f0fe101ed12225178d2ae29cd1272cff26" dependencies = [ "bstr", "gix-glob", @@ -1686,9 +1732,9 @@ dependencies = [ [[package]] name = "gix-index" -version = "0.46.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31c6b3664efe5916c539c50e610f9958f2993faf8e29fa5a40fb80b6ac8486a" +checksum = "1bae54ab14e4e74d5dda60b82ea7afad7c8eb3be68283d6d5f29bd2e6d47fff7" dependencies = [ "bitflags 2.10.0", "bstr", @@ -1707,7 +1753,7 @@ dependencies = [ "itoa", "libc", "memmap2", - "rustix 1.1.3", + "rustix 1.1.4", "smallvec", "thiserror 2.0.18", ] @@ -1725,21 +1771,61 @@ dependencies = [ [[package]] name = "gix-mailmap" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6fd521cb582620b7066b5b420ace1951cb84fe2241fa239b227e1a94fa25dc" +checksum = "c7b4818da522786ec7e32a00884ee8fc40fa4c215c3997c0b15f7b62684d1199" dependencies = [ "bstr", "gix-actor", "gix-date", + "gix-error", +] + +[[package]] +name = "gix-merge" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4606747466512d22c2dffc019142e1941238f543987ea51353c938cca80c500" +dependencies = [ + "bstr", + "gix-command", + "gix-diff", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", + "gix-quote", + "gix-revision", + "gix-revwalk", + "gix-tempfile", + "gix-trace", + "gix-worktree", + "imara-diff 0.1.8", + "nonempty", "thiserror 2.0.18", ] +[[package]] +name = "gix-negotiate" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea064c7595eea08fdd01c70748af747d9acc40f727b61f4c8a2145a5c5fc28c" +dependencies = [ + "bitflags 2.10.0", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-object", + "gix-revwalk", +] + [[package]] name = "gix-object" -version = "0.55.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3f705c977d90ace597049252ae1d7fec907edc0fa7616cc91bf5508d0f4006" +checksum = "cafb802bb688a7c1e69ef965612ff5ff859f046bfb616377e4a0ba4c01e43d47" dependencies = [ "bstr", "gix-actor", @@ -1758,9 +1844,9 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.75.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d59882d2fdab5e609b0c452a6ef9a3bd12ef6b694be4f82ab8f126ad0969864" +checksum = "24833ae9323b4f7079575fb9f961cf9c414b0afbec428a536ab8e7dd93bc002b" dependencies = [ "arc-swap", "gix-features", @@ -1778,9 +1864,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.65.0" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c44db57ebbbeaad9972c2a60662142660427a1f0a7529314d53fefb4fedad24" +checksum = "e3484119cd19859d7d7639413c27e192478fa354d3f4ff5f7e3c041e8040f0f4" dependencies = [ "clru", "gix-chunk", @@ -1798,9 +1884,9 @@ dependencies = [ [[package]] name = "gix-packetline" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c333badf342e9c2392800a96b9f2cf5bcb33906d2577d6ec923756ff4008a3f" +checksum = "be19313dcdb7dff75a3ce2f99be00878458295bcc3b6c7f0005591597573345c" dependencies = [ "bstr", "faster-hex", @@ -1810,9 +1896,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c3cd795cad18c7acbc6bafe34bfb34ac7273ee81133793f9d1516dd9faf922" +checksum = "09c31d4373bda7fab9eb01822927b55185a378d6e1bf737e0a54c743ad806658" dependencies = [ "bstr", "gix-trace", @@ -1822,9 +1908,9 @@ dependencies = [ [[package]] name = "gix-pathspec" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df6fd8e514d8b99ec5042ee17909a17750ccf54d0b8b30c850954209c800322" +checksum = "f89611f13544ca5ebeb68a502673814ef57200df60c24a61c2ce7b96f612f08b" dependencies = [ "bitflags 2.10.0", "bstr", @@ -1837,9 +1923,9 @@ dependencies = [ [[package]] name = "gix-protocol" -version = "0.56.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54f20837b0c70b65f6ac77886be033de3b69d5879f99128b47c42665ab0a17c2" +checksum = "4f38666350736b5877c79f57ddae02bde07a4ce186d889adc391e831cddcbe76" dependencies = [ "bstr", "gix-date", @@ -1850,26 +1936,27 @@ dependencies = [ "gix-transport", "gix-utils", "maybe-async", + "nonempty", "thiserror 2.0.18", "winnow", ] [[package]] name = "gix-quote" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e912ec04b7b1566a85ad486db0cab6b9955e3e32bcd3c3a734542ab3af084c5b" +checksum = "68533db71259c8776dd4e770d2b7b98696213ecdc1f5c9e3507119e274e0c578" dependencies = [ "bstr", + "gix-error", "gix-utils", - "thiserror 2.0.18", ] [[package]] name = "gix-ref" -version = "0.58.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf780dcd9ac99fd3fcfc8523479a0e2ffd55f5e0be63e5e3248fb7e46cff966" +checksum = "c2159978abb99b7027c8579d15211e262ef0ef2594d5cecb3334fbcbdfe2997c" dependencies = [ "gix-actor", "gix-features", @@ -1888,9 +1975,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.36.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ce400a770a7952e45267803192cc2d1fe0afa08e2c08dde32e04c7908c6e61" +checksum = "dc806ee13f437428f8a1ba4c72ecfaa3f20e14f5f0d4c2bc17d0b33e794aa6ac" dependencies = [ "bstr", "gix-error", @@ -1904,9 +1991,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.40.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c719cf7d669439e1fca735bd1c4de54d43c5d30e8883fd6063c4924b213d70c9" +checksum = "7c08f1ec5d1e6a524f8ba291c41f0ccaef64e48ed0e8cf790b3461cae45f6d3d" dependencies = [ "bitflags 2.10.0", "bstr", @@ -1918,13 +2005,14 @@ dependencies = [ "gix-object", "gix-revwalk", "gix-trace", + "nonempty", ] [[package]] name = "gix-revwalk" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a50b30aa0c6e6de43c723359c5809a96275a3aa92d323ef7f58b1cdd60f16" +checksum = "0e4b2b87772b21ca449249e86d32febadba5cba32b0fcce804ab9cefc6f2111c" dependencies = [ "gix-commitgraph", "gix-date", @@ -1938,9 +2026,9 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beeb3bc63696cf7acb5747a361693ebdbcaf25b5d27d2308f38e9782983e7bce" +checksum = "bf82ae037de9c62850ce67beaa92ec8e3e17785ea307cdde7618edc215603b4f" dependencies = [ "bitflags 2.10.0", "gix-path", @@ -1950,21 +2038,22 @@ dependencies = [ [[package]] name = "gix-shallow" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f4660fed3786d28e7e57d31b2de9ab3bf846068e187ccc52ee513de19a0073" +checksum = "cbf60711c9083b2364b3fac8a352444af76b17201f3682fdebe74fa66d89a772" dependencies = [ "bstr", "gix-hash", "gix-lock", + "nonempty", "thiserror 2.0.18", ] [[package]] name = "gix-status" -version = "0.25.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c994dbca7f038cfcde6337673523bab6e6b4f544b5046f5120a02bdeafff33" +checksum = "23d6c598e3fdbc352fba1c5ba7e709e69402fafbc44d9295edad2e3c4738996b" dependencies = [ "bstr", "filetime", @@ -1985,9 +2074,9 @@ dependencies = [ [[package]] name = "gix-submodule" -version = "0.25.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db1840fe723c6264ee596e5a179e1b9a2df59351f09bae9cea570a472a790bc0" +checksum = "0ce5c3929c5e6821f651d35e8420f72fea3cfafe9fc1e928a61e718b462c72a5" dependencies = [ "bstr", "gix-config", @@ -2013,15 +2102,15 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e42a4c2583357721ba2d887916e78df504980f22f1182df06997ce197b89504" +checksum = "f69a13643b8437d4ca6845e08143e847a36ca82903eed13303475d0ae8b162e0" [[package]] name = "gix-transport" -version = "0.53.0" +version = "0.55.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de1064c7ffa5a915014a6a5b71fbc5299462ae655348bed23e083b4a735076c3" +checksum = "a521e39c6235ce63ed6c001e2dd79818c830b82c3b7b59247ee7b229c39ec9bb" dependencies = [ "bstr", "gix-command", @@ -2035,9 +2124,9 @@ dependencies = [ [[package]] name = "gix-traverse" -version = "0.52.0" +version = "0.55.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f8b53b4c56b01c43a4491c4edfe2ce66c654eb86232205172ceb1650d21c55" +checksum = "963dc2afcdb611092aa587c3f9365e749ac0a0892ff27662dbc75f26c953fbec" dependencies = [ "bitflags 2.10.0", "gix-commitgraph", @@ -2052,9 +2141,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.35.0" +version = "0.35.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca2e50308a8373069e71970939f43ea4a1b5f422cf807d048ebcf07dcc02b2c" +checksum = "d28e8af3d42581190da884f013caf254d2fd4d6ab102408f08d21bfa11de6c8d" dependencies = [ "bstr", "gix-path", @@ -2084,9 +2173,9 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.47.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2ad658586ec0039b03e96c664f08b7cb7a2b7cca6947a9c856c9ed59b807b1" +checksum = "e6bd5830cbc43c9c00918b826467d2afad685b195cb82329cde2b2d116d2c578" dependencies = [ "bstr", "gix-attributes", @@ -2100,6 +2189,42 @@ dependencies = [ "gix-validate", ] +[[package]] +name = "gix-worktree-state" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644a1681f96e1be43c2a8384337d9d220e7624f50db54beda70997052aebf707" +dependencies = [ + "bstr", + "gix-features", + "gix-filter", + "gix-fs", + "gix-index", + "gix-object", + "gix-path", + "gix-worktree", + "io-close", + "thiserror 2.0.18", +] + +[[package]] +name = "gix-worktree-stream" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e3fb70a1f650a5cec7d5b8d10d6d6fe86daf3cf15bde08ba0c70988a2932c3" +dependencies = [ + "gix-attributes", + "gix-error", + "gix-features", + "gix-filter", + "gix-fs", + "gix-hash", + "gix-object", + "gix-path", + "gix-traverse", + "parking_lot", +] + [[package]] name = "group" version = "0.13.0" @@ -2360,6 +2485,16 @@ dependencies = [ "hashbrown 0.15.2", ] +[[package]] +name = "imara-diff" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c" +dependencies = [ + "hashbrown 0.15.2", + "memchr", +] + [[package]] name = "indexmap" version = "2.13.0" @@ -2425,6 +2560,16 @@ dependencies = [ name = "invalidstring" version = "0.1.3" +[[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 = "is_terminal_polyfill" version = "1.70.1" @@ -2448,9 +2593,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jiff" -version = "0.2.18" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" +checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -2463,9 +2608,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.18" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" +checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" dependencies = [ "proc-macro2", "quote", @@ -2568,9 +2713,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.180" +version = "0.2.184" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" [[package]] name = "libgit2-sys" @@ -2646,9 +2791,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" @@ -2715,9 +2860,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] @@ -2787,6 +2932,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonempty" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9737e026353e5cd0736f98eddae28665118eb6f6600902a7f50db585621fecb6" + [[package]] name = "notify" version = "8.2.0" @@ -3634,14 +3785,14 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.11.0", + "linux-raw-sys 0.12.1", "windows-sys 0.61.2", ] @@ -4114,14 +4265,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.24.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.2", "once_cell", - "rustix 1.1.3", + "rustix 1.1.4", "windows-sys 0.61.2", ] @@ -4669,7 +4820,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ "env_home", - "rustix 1.1.3", + "rustix 1.1.4", "winsafe", ] @@ -5160,6 +5311,6 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.5.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" +checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" diff --git a/asyncgit/Cargo.toml b/asyncgit/Cargo.toml index 5e77498ae3..35504efb12 100644 --- a/asyncgit/Cargo.toml +++ b/asyncgit/Cargo.toml @@ -19,10 +19,13 @@ easy-cast = "0.5" fuzzy-matcher = "0.3" git2 = "0.20" git2-hooks = { path = "../git2-hooks", version = "0.7" } -gix = { version = "0.78.0", default-features = false, features = [ +gix = { version = "0.81.0", default-features = false, features = [ + "blame", + "blob-diff", "mailmap", "max-performance", "revision", + "sha1", "status", ] } log = "0.4" diff --git a/asyncgit/src/error.rs b/asyncgit/src/error.rs index e36040d814..a789a7efe4 100644 --- a/asyncgit/src/error.rs +++ b/asyncgit/src/error.rs @@ -7,6 +7,10 @@ use thiserror::Error; /// #[derive(Error, Debug)] pub enum GixError { + /// + #[error("gix::config::diff::algorithm error: {0}")] + ConfigDiffAlgorithm(#[from] gix::config::diff::algorithm::Error), + /// #[error("gix::discover error: {0}")] Discover(#[from] Box), @@ -47,6 +51,12 @@ pub enum GixError { #[error("gix::reference::iter::init::Error error: {0}")] ReferenceIterInit(#[from] gix::reference::iter::init::Error), + /// + #[error("gix::repository::blame_file::Error error: {0}")] + RepositoryBlameFile( + #[from] Box, + ), + /// #[error("gix::revision::walk error: {0}")] RevisionWalk(#[from] gix::revision::walk::Error), @@ -201,6 +211,12 @@ impl From> for Error { } } +impl From for Error { + fn from(error: gix::config::diff::algorithm::Error) -> Self { + Self::Gix(GixError::from(error)) + } +} + impl From for GixError { fn from(error: gix::discover::Error) -> Self { Self::Discover(Box::new(error)) @@ -348,3 +364,15 @@ impl From for Error { Self::Gix(GixError::from(error)) } } + +impl From for GixError { + fn from(error: gix::repository::blame_file::Error) -> Self { + Self::RepositoryBlameFile(Box::new(error)) + } +} + +impl From for Error { + fn from(error: gix::repository::blame_file::Error) -> Self { + Self::Gix(GixError::from(error)) + } +} diff --git a/asyncgit/src/sync/blame.rs b/asyncgit/src/sync/blame.rs index 19f125f6b3..da09e4b02e 100644 --- a/asyncgit/src/sync/blame.rs +++ b/asyncgit/src/sync/blame.rs @@ -2,14 +2,12 @@ use super::{utils, CommitId, RepoPath}; use crate::{ - error::{Error, Result}, - sync::{get_commits_info, repository::repo}, + error::Result, + sync::{get_commits_info, gix_repo}, }; -use git2::BlameOptions; +use gix::repository::blame_file::Options; use scopetime::scope_time; use std::collections::{HashMap, HashSet}; -use std::io::{BufRead, BufReader}; -use std::path::Path; /// A `BlameHunk` contains all the information that will be shown to the user. #[derive(Clone, Hash, Debug, PartialEq, Eq)] @@ -40,19 +38,6 @@ pub struct FileBlame { pub lines: Vec<(Option, String)>, } -/// fixup `\` windows path separators to git compatible `/` -fn fixup_windows_path(path: &str) -> String { - #[cfg(windows)] - { - path.replace('\\', "/") - } - - #[cfg(not(windows))] - { - path.to_string() - } -} - /// pub fn blame_file( repo_path: &RepoPath, @@ -61,35 +46,33 @@ pub fn blame_file( ) -> Result { scope_time!("blame_file"); - let repo = repo(repo_path)?; + let file_path: &gix::bstr::BStr = file_path.into(); + let file_path = + gix::path::to_unix_separators_on_windows(file_path); + + let repo: gix::Repository = gix_repo(repo_path)?; + let tip: gix::ObjectId = match commit_id { + Some(commit_id) => gix::ObjectId::from_bytes_or_panic( + commit_id.get_oid().as_bytes(), + ), + _ => repo.head()?.peel_to_commit()?.id, + }; + + let outcome = + repo.blame_file(&file_path, tip, Options::default())?; let commit_id = if let Some(commit_id) = commit_id { commit_id } else { + let repo = crate::sync::repo(repo_path)?; + utils::get_head_repo(&repo)? }; - let spec = - format!("{}:{}", commit_id, fixup_windows_path(file_path)); - - let object = repo.revparse_single(&spec)?; - let blob = repo.find_blob(object.id())?; - - if blob.is_binary() { - return Err(Error::NoBlameOnBinaryFile); - } - - let mut opts = BlameOptions::new(); - opts.newest_commit(commit_id.into()); - - let blame = - repo.blame_file(Path::new(file_path), Some(&mut opts))?; - - let reader = BufReader::new(blob.content()); - - let unique_commit_ids: HashSet<_> = blame + let unique_commit_ids: HashSet = outcome + .entries .iter() - .map(|hunk| CommitId::new(hunk.final_commit_id())) + .map(|entry| entry.commit_id.into()) .collect(); let mut commit_ids = Vec::with_capacity(unique_commit_ids.len()); commit_ids.extend(unique_commit_ids); @@ -100,46 +83,49 @@ pub fn blame_file( .map(|commit_info| (commit_info.id, commit_info)) .collect(); - let lines: Vec<(Option, String)> = reader - .lines() - .enumerate() - .map(|(i, line)| { - // Line indices in a `FileBlame` are 1-based. - let corresponding_hunk = blame.get_line(i + 1); - - if let Some(hunk) = corresponding_hunk { - let commit_id = CommitId::new(hunk.final_commit_id()); - // Line indices in a `BlameHunk` are 1-based. - let start_line = - hunk.final_start_line().saturating_sub(1); - let end_line = - start_line.saturating_add(hunk.lines_in_hunk()); - - if let Some(commit_info) = - unique_commit_infos.get(&commit_id) - { - let hunk = BlameHunk { - commit_id, - author: commit_info.author.clone(), - time: commit_info.time, - start_line, - end_line, - }; - - return ( - Some(hunk), - line.unwrap_or_else(|_| String::new()), - ); - } - } - - (None, line.unwrap_or_else(|_| String::new())) + // TODO + // The shape of data as returned by `entries_with_lines` is preferable to the one chosen here + // because the former is much closer to what the UI is going to need in the end. + let lines: Vec<(Option, String)> = outcome + .entries_with_lines() + .flat_map(|(entry, lines)| { + let commit_id = entry.commit_id.into(); + let start_in_blamed_file = + entry.start_in_blamed_file as usize; + + lines + .iter() + .enumerate() + .map(|(i, line)| { + // TODO + let trimmed_line = + line.to_string().trim_end().to_string(); + + if let Some(commit_info) = + unique_commit_infos.get(&commit_id) + { + return ( + Some(BlameHunk { + commit_id, + author: commit_info.author.clone(), + time: commit_info.time, + start_line: start_in_blamed_file + i, + end_line: start_in_blamed_file + + i + 1, + }), + trimmed_line, + ); + } + + (None, trimmed_line) + }) + .collect::>() }) .collect(); let file_blame = FileBlame { commit_id, - path: file_path.into(), + path: file_path.to_string(), lines, }; diff --git a/deny.toml b/deny.toml index 92c14f0d89..30bc6c77da 100644 --- a/deny.toml +++ b/deny.toml @@ -30,21 +30,11 @@ skip-tree = [ # this is needed for: # `bwrap v1.3.0` (https://github.com/micl2e2/bwrap/pull/4) { name = "unicode-width" }, - # currently needed due to `ratatui v0.29.0` - { name = "unicode-truncate" }, - # currently needed due to: - # * `redox_users v0.4.6` - # * `syntect v5.2.0` - { name = "thiserror" }, # currently needed due to: # * `windows v0.57.0` # * `iana-time-zone v0.1.60` { name = "windows-core" }, # currently needed due to: - # * `parking_lot_core v0.9.10` - # * `filetime v0.2.23` - { name = "redox_syscall" }, - # currently needed due to: # * `gix-hashtable v0.6.0` { name = "hashbrown" }, # 2022-10-26 `getrandom` and `rustix` were added when `gitoxide` was @@ -60,4 +50,7 @@ skip-tree = [ # * `gix-index v0.42.1` # * `tempfile v3.23.0` { name = "rustix" }, + # 2026-04-01 `imara-diff` was added because `gix-diff` depends on 0.1.x while + # `gix-blame` depends on 0.2.x + { name = "imara-diff" }, ]