diff --git a/Cargo.lock b/Cargo.lock index 50ba9d0..2948164 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,6 +39,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "anstream" version = "0.6.14" @@ -167,6 +173,7 @@ dependencies = [ "cargo_toml", "clap", "figment", + "gix 0.62.0", "memmap", "parking_lot", "project-base-directory", @@ -407,6 +414,19 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "deranged" version = "0.3.11" @@ -513,6 +533,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -545,49 +571,49 @@ version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad6d32e74454459690d57d18ea4ebec1629936e6b130b51d12cb4a81630ac953" dependencies = [ - "gix-actor", - "gix-archive", - "gix-attributes", - "gix-commitgraph", - "gix-config", - "gix-credentials", + "gix-actor 0.27.0", + "gix-archive 0.5.0", + "gix-attributes 0.19.0", + "gix-commitgraph 0.21.0", + "gix-config 0.30.0", + "gix-credentials 0.20.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-diff 0.36.0", + "gix-discover 0.25.0", + "gix-features 0.35.0", + "gix-filter 0.5.0", + "gix-fs 0.7.0", + "gix-glob 0.13.0", + "gix-hash 0.13.3", + "gix-hashtable 0.4.1", + "gix-ignore 0.8.0", + "gix-index 0.25.0", + "gix-lock 10.0.0", "gix-macros", - "gix-mailmap", - "gix-negotiate", - "gix-object", - "gix-odb", - "gix-pack", + "gix-mailmap 0.19.0", + "gix-negotiate 0.8.0", + "gix-object 0.37.0", + "gix-odb 0.53.0", + "gix-pack 0.43.0", "gix-path", - "gix-pathspec", - "gix-prompt", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-revwalk", + "gix-pathspec 0.3.0", + "gix-prompt 0.7.0", + "gix-ref 0.37.0", + "gix-refspec 0.18.0", + "gix-revision 0.22.0", + "gix-revwalk 0.8.0", "gix-sec", - "gix-status", - "gix-submodule", - "gix-tempfile", + "gix-status 0.1.0", + "gix-submodule 0.4.0", + "gix-tempfile 10.0.0", "gix-trace", - "gix-traverse", - "gix-url", + "gix-traverse 0.33.0", + "gix-url 0.24.0", "gix-utils", "gix-validate", - "gix-worktree", - "gix-worktree-state", - "gix-worktree-stream", + "gix-worktree 0.26.0", + "gix-worktree-state 0.3.0", + "gix-worktree-stream 0.5.0", "once_cell", "parking_lot", "regex", @@ -597,6 +623,65 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "gix" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5631c64fb4cd48eee767bf98a3cbc5c9318ef3bb71074d4c099a2371510282b6" +dependencies = [ + "gix-actor 0.31.1", + "gix-archive 0.12.0", + "gix-attributes 0.22.2", + "gix-command 0.3.6", + "gix-commitgraph 0.24.2", + "gix-config 0.36.1", + "gix-credentials 0.24.2", + "gix-date", + "gix-diff 0.43.0", + "gix-dir", + "gix-discover 0.31.0", + "gix-features 0.38.1", + "gix-filter 0.11.1", + "gix-fs 0.10.2", + "gix-glob 0.16.2", + "gix-hash 0.14.2", + "gix-hashtable 0.5.2", + "gix-ignore 0.11.2", + "gix-index 0.32.1", + "gix-lock 13.1.1", + "gix-macros", + "gix-mailmap 0.23.0", + "gix-negotiate 0.13.0", + "gix-object 0.42.1", + "gix-odb 0.60.0", + "gix-pack 0.50.0", + "gix-path", + "gix-pathspec 0.7.4", + "gix-prompt 0.8.4", + "gix-ref 0.43.0", + "gix-refspec 0.23.0", + "gix-revision 0.27.0", + "gix-revwalk 0.13.0", + "gix-sec", + "gix-status 0.9.0", + "gix-submodule 0.10.0", + "gix-tempfile 13.1.1", + "gix-trace", + "gix-traverse 0.39.0", + "gix-url 0.27.3", + "gix-utils", + "gix-validate", + "gix-worktree 0.33.1", + "gix-worktree-state 0.10.0", + "gix-worktree-stream 0.12.0", + "once_cell", + "parking_lot", + "regex", + "signal-hook", + "smallvec", + "thiserror", +] + [[package]] name = "gix-actor" version = "0.27.0" @@ -611,6 +696,20 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "gix-actor" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45c3a3bde455ad2ee8ba8a195745241ce0b770a8a26faae59fcf409d01b28c46" +dependencies = [ + "bstr", + "gix-date", + "gix-utils", + "itoa", + "thiserror", + "winnow 0.6.7", +] + [[package]] name = "gix-archive" version = "0.5.0" @@ -619,8 +718,21 @@ checksum = "ab71635f7fb38ad4cc7da7e98af79e3010e35b05de5cb6eb79b2da68ab93eac7" dependencies = [ "bstr", "gix-date", - "gix-object", - "gix-worktree-stream", + "gix-object 0.37.0", + "gix-worktree-stream 0.5.0", + "thiserror", +] + +[[package]] +name = "gix-archive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f28b5481bbe35de9f2eacbd8dbc61da7b8d763eaecd667018602aa805e2e2e" +dependencies = [ + "bstr", + "gix-date", + "gix-object 0.42.1", + "gix-worktree-stream 0.12.0", "thiserror", ] @@ -632,10 +744,27 @@ checksum = "2451665e70709ba4753b623ef97511ee98c4a73816b2c5b5df25678d607ed820" dependencies = [ "bstr", "byteyarn", - "gix-glob", + "gix-glob 0.13.0", + "gix-path", + "gix-quote", + "gix-trace", + "smallvec", + "thiserror", + "unicode-bom", +] + +[[package]] +name = "gix-attributes" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eefb48f42eac136a4a0023f49a54ec31be1c7a9589ed762c45dcb9b953f7ecc8" +dependencies = [ + "bstr", + "gix-glob 0.16.2", "gix-path", "gix-quote", "gix-trace", + "kstring", "smallvec", "thiserror", "unicode-bom", @@ -668,6 +797,18 @@ dependencies = [ "bstr", ] +[[package]] +name = "gix-command" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90009020dc4b3de47beed28e1334706e0a330ddd17f5cfeb097df3b15a54b77" +dependencies = [ + "bstr", + "gix-path", + "gix-trace", + "shell-words", +] + [[package]] name = "gix-commitgraph" version = "0.21.0" @@ -676,9 +817,23 @@ checksum = "e75a975ee22cf0a002bfe9b5d5cb3d2a88e263a8a178cd7509133cff10f4df8a" dependencies = [ "bstr", "gix-chunk", - "gix-features", - "gix-hash", - "memmap2", + "gix-features 0.35.0", + "gix-hash 0.13.3", + "memmap2 0.7.1", + "thiserror", +] + +[[package]] +name = "gix-commitgraph" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b102311085da4af18823413b5176d7c500fb2272eaf391cfa8635d8bcb12c4" +dependencies = [ + "bstr", + "gix-chunk", + "gix-features 0.38.1", + "gix-hash 0.14.2", + "memmap2 0.9.4", "thiserror", ] @@ -690,10 +845,10 @@ checksum = "c171514b40487d3f677ae37efc0f45ac980e3169f23c27eb30a70b47fdf88ab5" dependencies = [ "bstr", "gix-config-value", - "gix-features", - "gix-glob", + "gix-features 0.35.0", + "gix-glob 0.13.0", "gix-path", - "gix-ref", + "gix-ref 0.37.0", "gix-sec", "memchr", "once_cell", @@ -703,6 +858,27 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "gix-config" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7580e05996e893347ad04e1eaceb92e1c0e6a3ffe517171af99bf6b6df0ca6e5" +dependencies = [ + "bstr", + "gix-config-value", + "gix-features 0.38.1", + "gix-glob 0.16.2", + "gix-path", + "gix-ref 0.43.0", + "gix-sec", + "memchr", + "once_cell", + "smallvec", + "thiserror", + "unicode-bom", + "winnow 0.6.7", +] + [[package]] name = "gix-config-value" version = "0.14.6" @@ -723,12 +899,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46900b884cc5af6a6c141ee741607c0c651a4e1d33614b8d888a1ba81cc0bc8a" dependencies = [ "bstr", - "gix-command", + "gix-command 0.2.10", "gix-config-value", "gix-path", - "gix-prompt", + "gix-prompt 0.7.0", "gix-sec", - "gix-url", + "gix-url 0.24.0", + "thiserror", +] + +[[package]] +name = "gix-credentials" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c70146183bd3c7119329a3c7392d1aa0e0adbe48d727f4df31828fe6d8fdaa1" +dependencies = [ + "bstr", + "gix-command 0.3.6", + "gix-config-value", + "gix-path", + "gix-prompt 0.8.4", + "gix-sec", + "gix-trace", + "gix-url 0.27.3", "thiserror", ] @@ -750,12 +943,52 @@ version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "788ddb152c388206e81f36bcbb574e7ed7827c27d8fa62227b34edc333d8928c" dependencies = [ - "gix-hash", - "gix-object", + "gix-hash 0.13.3", + "gix-object 0.37.0", + "imara-diff", + "thiserror", +] + +[[package]] +name = "gix-diff" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5fbc24115b957346cd23fb0f47d830eb799c46c89cdcf2f5acc9bf2938c2d01" +dependencies = [ + "bstr", + "gix-command 0.3.6", + "gix-filter 0.11.1", + "gix-fs 0.10.2", + "gix-hash 0.14.2", + "gix-object 0.42.1", + "gix-path", + "gix-tempfile 13.1.1", + "gix-trace", + "gix-worktree 0.33.1", "imara-diff", "thiserror", ] +[[package]] +name = "gix-dir" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fcd56ffa1133f35525af890226ad0d3b2e607b4490360c94b1869e278eba3" +dependencies = [ + "bstr", + "gix-discover 0.31.0", + "gix-fs 0.10.2", + "gix-ignore 0.11.2", + "gix-index 0.32.1", + "gix-object 0.42.1", + "gix-path", + "gix-pathspec 0.7.4", + "gix-trace", + "gix-utils", + "gix-worktree 0.33.1", + "thiserror", +] + [[package]] name = "gix-discover" version = "0.25.0" @@ -764,9 +997,25 @@ checksum = "69507643d75a0ea9a402fcf73ced517d2b95cc95385904ac09d03e0b952fde33" dependencies = [ "bstr", "dunce", - "gix-hash", + "gix-hash 0.13.3", + "gix-path", + "gix-ref 0.37.0", + "gix-sec", + "thiserror", +] + +[[package]] +name = "gix-discover" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64bab49087ed3710caf77e473dc0efc54ca33d8ccc6441359725f121211482b1" +dependencies = [ + "bstr", + "dunce", + "gix-fs 0.10.2", + "gix-hash 0.14.2", "gix-path", - "gix-ref", + "gix-ref 0.43.0", "gix-sec", "thiserror", ] @@ -782,13 +1031,37 @@ dependencies = [ "crc32fast", "crossbeam-channel", "flate2", - "gix-hash", + "gix-hash 0.13.3", "gix-trace", "jwalk", "libc", "once_cell", "parking_lot", - "prodash", + "prodash 26.2.2", + "sha1_smol", + "thiserror", + "walkdir", +] + +[[package]] +name = "gix-features" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db4254037d20a247a0367aa79333750146a369719f0c6617fec4f5752cc62b37" +dependencies = [ + "bytes", + "bytesize", + "crc32fast", + "crossbeam-channel", + "flate2", + "gix-hash 0.14.2", + "gix-trace", + "gix-utils", + "jwalk", + "libc", + "once_cell", + "parking_lot", + "prodash 28.0.0", "sha1_smol", "thiserror", "walkdir", @@ -802,11 +1075,11 @@ checksum = "1be40d28cd41445bb6cd52c4d847d915900e5466f7433eaee6a9e0a3d1d88b08" dependencies = [ "bstr", "encoding_rs", - "gix-attributes", - "gix-command", - "gix-hash", - "gix-object", - "gix-packetline-blocking", + "gix-attributes 0.19.0", + "gix-command 0.2.10", + "gix-hash 0.13.3", + "gix-object 0.37.0", + "gix-packetline-blocking 0.16.6", "gix-path", "gix-quote", "gix-trace", @@ -814,13 +1087,44 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-filter" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0d1f01af62bfd2fb3dd291acc2b29d4ab3e96ad52a679174626508ce98ef12" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes 0.22.2", + "gix-command 0.3.6", + "gix-hash 0.14.2", + "gix-object 0.42.1", + "gix-packetline-blocking 0.17.4", + "gix-path", + "gix-quote", + "gix-trace", + "gix-utils", + "smallvec", + "thiserror", +] + [[package]] name = "gix-fs" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09815faba62fe9b32d918b75a554686c98e43f7d48c43a80df58eb718e5c6635" dependencies = [ - "gix-features", + "gix-features 0.35.0", +] + +[[package]] +name = "gix-fs" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2184c40e7910529677831c8b481acf788ffd92427ed21fad65b6aa637e631b8" +dependencies = [ + "gix-features 0.38.1", + "gix-utils", ] [[package]] @@ -831,7 +1135,19 @@ checksum = "a9d76e85f11251dcf751d2c5e918a14f562db5be6f727fd24775245653e9b19d" dependencies = [ "bitflags 2.5.0", "bstr", - "gix-features", + "gix-features 0.35.0", + "gix-path", +] + +[[package]] +name = "gix-glob" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "682bdc43cb3c00dbedfcc366de2a849b582efd8d886215dbad2ea662ec156bb5" +dependencies = [ + "bitflags 2.5.0", + "bstr", + "gix-features 0.38.1", "gix-path", ] @@ -845,13 +1161,34 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-hash" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93d7df7366121b5018f947a04d37f034717e113dcf9ccd85c34b58e57a74d5e" +dependencies = [ + "faster-hex 0.9.0", + "thiserror", +] + [[package]] name = "gix-hashtable" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feb61880816d7ec4f0b20606b498147d480860ddd9133ba542628df2f548d3ca" dependencies = [ - "gix-hash", + "gix-hash 0.13.3", + "hashbrown 0.14.5", + "parking_lot", +] + +[[package]] +name = "gix-hashtable" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ddf80e16f3c19ac06ce415a38b8591993d3f73aede049cb561becb5b3a8e242" +dependencies = [ + "gix-hash 0.14.2", "hashbrown 0.14.5", "parking_lot", ] @@ -863,11 +1200,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048f443a1f6b02da4205c34d2e287e3fd45d75e8e2f06cfb216630ea9bff5e3" dependencies = [ "bstr", - "gix-glob", + "gix-glob 0.13.0", "gix-path", "unicode-bom", ] +[[package]] +name = "gix-ignore" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "640dbeb4f5829f9fc14d31f654a34a0350e43a24e32d551ad130d99bf01f63f1" +dependencies = [ + "bstr", + "gix-glob 0.16.2", + "gix-path", + "gix-trace", + "unicode-bom", +] + [[package]] name = "gix-index" version = "0.25.0" @@ -879,14 +1229,41 @@ dependencies = [ "btoi", "filetime", "gix-bitmap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-traverse", + "gix-features 0.35.0", + "gix-fs 0.7.0", + "gix-hash 0.13.3", + "gix-lock 10.0.0", + "gix-object 0.37.0", + "gix-traverse 0.33.0", "itoa", - "memmap2", + "memmap2 0.7.1", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-index" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881ab3b1fa57f497601a5add8289e72a7ae09471fc0b9bbe483b628ae8e418a1" +dependencies = [ + "bitflags 2.5.0", + "bstr", + "filetime", + "fnv", + "gix-bitmap", + "gix-features 0.38.1", + "gix-fs 0.10.2", + "gix-hash 0.14.2", + "gix-lock 13.1.1", + "gix-object 0.42.1", + "gix-traverse 0.39.0", + "gix-utils", + "hashbrown 0.14.5", + "itoa", + "libc", + "memmap2 0.9.4", + "rustix", "smallvec", "thiserror", ] @@ -897,7 +1274,18 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47fc96fa8b6b6d33555021907c81eb3b27635daecf6e630630bdad44f8feaa95" dependencies = [ - "gix-tempfile", + "gix-tempfile 10.0.0", + "gix-utils", + "thiserror", +] + +[[package]] +name = "gix-lock" +version = "13.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c359f81f01b8352063319bcb39789b7ea0887b406406381106e38c4a34d049" +dependencies = [ + "gix-tempfile 13.1.1", "gix-utils", "thiserror", ] @@ -920,7 +1308,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40f00fa96e29e066ef208f5d13e0f5f95fa70c3ae4bd4f0234272ed4d708a7db" dependencies = [ "bstr", - "gix-actor", + "gix-actor 0.27.0", + "gix-date", + "thiserror", +] + +[[package]] +name = "gix-mailmap" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a62c86c08a65f99002013d58dd3312b2987705547436bdb90c507dcd9a41b1" +dependencies = [ + "bstr", + "gix-actor 0.31.1", "gix-date", "thiserror", ] @@ -932,11 +1332,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f1697bf9911c6d1b8d709b9e6ef718cb5ea5821a1b7991520125a8134448004" dependencies = [ "bitflags 2.5.0", - "gix-commitgraph", + "gix-commitgraph 0.21.0", + "gix-date", + "gix-hash 0.13.3", + "gix-object 0.37.0", + "gix-revwalk 0.8.0", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-negotiate" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ba98f8c8c06870dfc167d192ca38a38261867b836cb89ac80bc9176dba975e" +dependencies = [ + "bitflags 2.5.0", + "gix-commitgraph 0.24.2", "gix-date", - "gix-hash", - "gix-object", - "gix-revwalk", + "gix-hash 0.14.2", + "gix-object 0.42.1", + "gix-revwalk 0.13.0", "smallvec", "thiserror", ] @@ -949,10 +1365,10 @@ checksum = "1e7e19616c67967374137bae83e950e9b518a9ea8a605069bd6716ada357fd6f" dependencies = [ "bstr", "btoi", - "gix-actor", + "gix-actor 0.27.0", "gix-date", - "gix-features", - "gix-hash", + "gix-features 0.35.0", + "gix-hash 0.13.3", "gix-validate", "itoa", "smallvec", @@ -960,6 +1376,25 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "gix-object" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d4f8efae72030df1c4a81d02dbe2348e748d9b9a11e108ed6efbd846326e051" +dependencies = [ + "bstr", + "gix-actor 0.31.1", + "gix-date", + "gix-features 0.38.1", + "gix-hash 0.14.2", + "gix-utils", + "gix-validate", + "itoa", + "smallvec", + "thiserror", + "winnow 0.6.7", +] + [[package]] name = "gix-odb" version = "0.53.0" @@ -968,10 +1403,30 @@ checksum = "8d6a392c6ba3a2f133cdc63120e9bc7aec81eef763db372c817de31febfe64bf" dependencies = [ "arc-swap", "gix-date", - "gix-features", - "gix-hash", - "gix-object", - "gix-pack", + "gix-features 0.35.0", + "gix-hash 0.13.3", + "gix-object 0.37.0", + "gix-pack 0.43.0", + "gix-path", + "gix-quote", + "parking_lot", + "tempfile", + "thiserror", +] + +[[package]] +name = "gix-odb" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8bbb43d2fefdc4701ffdf9224844d05b136ae1b9a73c2f90710c8dd27a93503" +dependencies = [ + "arc-swap", + "gix-date", + "gix-features 0.38.1", + "gix-fs 0.10.2", + "gix-hash 0.14.2", + "gix-object 0.42.1", + "gix-pack 0.50.0", "gix-path", "gix-quote", "parking_lot", @@ -987,13 +1442,34 @@ checksum = "7536203a45b31e1bc5694bbf90ba8da1b736c77040dd6a520db369f371eb1ab3" dependencies = [ "clru", "gix-chunk", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-object", + "gix-features 0.35.0", + "gix-hash 0.13.3", + "gix-hashtable 0.4.1", + "gix-object 0.37.0", "gix-path", - "gix-tempfile", - "memmap2", + "gix-tempfile 10.0.0", + "memmap2 0.7.1", + "parking_lot", + "smallvec", + "thiserror", + "uluru", +] + +[[package]] +name = "gix-pack" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58bad27c7677fa6b587aab3a1aca0b6c97373bd371a0a4290677c838c9bcaf1" +dependencies = [ + "clru", + "gix-chunk", + "gix-features 0.38.1", + "gix-hash 0.14.2", + "gix-hashtable 0.5.2", + "gix-object 0.42.1", + "gix-path", + "gix-tempfile 13.1.1", + "memmap2 0.9.4", "parking_lot", "smallvec", "thiserror", @@ -1011,6 +1487,18 @@ dependencies = [ "thiserror", ] +[[package]] +name = "gix-packetline-blocking" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31d42378a3d284732e4d589979930d0d253360eccf7ec7a80332e5ccb77e14a" +dependencies = [ + "bstr", + "faster-hex 0.9.0", + "gix-trace", + "thiserror", +] + [[package]] name = "gix-path" version = "0.10.7" @@ -1032,9 +1520,24 @@ checksum = "c3e26c9b47c51be73f98d38c84494bd5fb99334c5d6fda14ef5d036d50a9e5fd" dependencies = [ "bitflags 2.5.0", "bstr", - "gix-attributes", + "gix-attributes 0.19.0", + "gix-config-value", + "gix-glob 0.13.0", + "gix-path", + "thiserror", +] + +[[package]] +name = "gix-pathspec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea9f934a111e0efdf93ae06e3648427e60e783099fbebd6a53a7a2ffb10a1e65" +dependencies = [ + "bitflags 2.5.0", + "bstr", + "gix-attributes 0.22.2", "gix-config-value", - "gix-glob", + "gix-glob 0.16.2", "gix-path", "thiserror", ] @@ -1045,7 +1548,20 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c9a913769516f5e9d937afac206fb76428e3d7238e538845842887fda584678" dependencies = [ - "gix-command", + "gix-command 0.2.10", + "gix-config-value", + "parking_lot", + "rustix", + "thiserror", +] + +[[package]] +name = "gix-prompt" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5325eb17ce7b5e5d25dec5c2315d642a09d55b9888b3bf46b7d72e1621a55d8" +dependencies = [ + "gix-command 0.3.6", "gix-config-value", "parking_lot", "rustix", @@ -1069,21 +1585,43 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e6b749660b613641769edc1954132eb8071a13c32224891686091bef078de4" dependencies = [ - "gix-actor", + "gix-actor 0.27.0", "gix-date", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", + "gix-features 0.35.0", + "gix-fs 0.7.0", + "gix-hash 0.13.3", + "gix-lock 10.0.0", + "gix-object 0.37.0", "gix-path", - "gix-tempfile", + "gix-tempfile 10.0.0", "gix-validate", - "memmap2", + "memmap2 0.7.1", "thiserror", "winnow 0.5.40", ] +[[package]] +name = "gix-ref" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd4aba68b925101cb45d6df328979af0681364579db889098a0de75b36c77b65" +dependencies = [ + "gix-actor 0.31.1", + "gix-date", + "gix-features 0.38.1", + "gix-fs 0.10.2", + "gix-hash 0.14.2", + "gix-lock 13.1.1", + "gix-object 0.42.1", + "gix-path", + "gix-tempfile 13.1.1", + "gix-utils", + "gix-validate", + "memmap2 0.9.4", + "thiserror", + "winnow 0.6.7", +] + [[package]] name = "gix-refspec" version = "0.18.0" @@ -1091,8 +1629,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0895cb7b1e70f3c3bd4550c329e9f5caf2975f97fcd4238e05754e72208ef61e" dependencies = [ "bstr", - "gix-hash", - "gix-revision", + "gix-hash 0.13.3", + "gix-revision 0.22.0", + "gix-validate", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-refspec" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde848865834a54fe4d9b4573f15d0e9a68eaf3d061b42d3ed52b4b8acf880b2" +dependencies = [ + "bstr", + "gix-hash 0.14.2", + "gix-revision 0.27.0", "gix-validate", "smallvec", "thiserror", @@ -1106,10 +1658,26 @@ checksum = "c8c4b15cf2ab7a35f5bcb3ef146187c8d36df0177e171ca061913cbaaa890e89" dependencies = [ "bstr", "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", + "gix-hash 0.13.3", + "gix-hashtable 0.4.1", + "gix-object 0.37.0", + "gix-revwalk 0.8.0", + "gix-trace", + "thiserror", +] + +[[package]] +name = "gix-revision" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e34196e1969bd5d36e2fbc4467d893999132219d503e23474a8ad2b221cb1e8" +dependencies = [ + "bstr", + "gix-date", + "gix-hash 0.14.2", + "gix-hashtable 0.5.2", + "gix-object 0.42.1", + "gix-revwalk 0.13.0", "gix-trace", "thiserror", ] @@ -1120,11 +1688,26 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9870c6b1032f2084567710c3b2106ac603377f8d25766b8a6b7c33e6e3ca279" dependencies = [ - "gix-commitgraph", + "gix-commitgraph 0.21.0", + "gix-date", + "gix-hash 0.13.3", + "gix-hashtable 0.4.1", + "gix-object 0.37.0", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-revwalk" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7d393ae814eeaae41a333c0ff684b243121cc61ccdc5bbe9897094588047d" +dependencies = [ + "gix-commitgraph 0.24.2", "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", + "gix-hash 0.14.2", + "gix-hashtable 0.5.2", + "gix-object 0.42.1", "smallvec", "thiserror", ] @@ -1149,13 +1732,35 @@ checksum = "082801c42ba707f2407b5cce3d99b89cfa84f3794962946dc94cfdc00ae522fa" dependencies = [ "bstr", "filetime", - "gix-features", - "gix-fs", - "gix-hash", - "gix-index", - "gix-object", + "gix-features 0.35.0", + "gix-fs 0.7.0", + "gix-hash 0.13.3", + "gix-index 0.25.0", + "gix-object 0.37.0", + "gix-path", + "gix-pathspec 0.3.0", + "thiserror", +] + +[[package]] +name = "gix-status" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c413bfd2952e4ee92e48438dac3c696f3555e586a34d184a427f6bedd1e4f9" +dependencies = [ + "bstr", + "filetime", + "gix-diff 0.43.0", + "gix-dir", + "gix-features 0.38.1", + "gix-filter 0.11.1", + "gix-fs 0.10.2", + "gix-hash 0.14.2", + "gix-index 0.32.1", + "gix-object 0.42.1", "gix-path", - "gix-pathspec", + "gix-pathspec 0.7.4", + "gix-worktree 0.33.1", "thiserror", ] @@ -1166,11 +1771,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0150e82e9282d3f2ab2dd57a22f9f6c3447b9d9856e5321ac92d38e3e0e2b7" dependencies = [ "bstr", - "gix-config", + "gix-config 0.30.0", + "gix-path", + "gix-pathspec 0.3.0", + "gix-refspec 0.18.0", + "gix-url 0.24.0", + "thiserror", +] + +[[package]] +name = "gix-submodule" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb7ea05666362472fecd44c1fc35fe48a5b9b841b431cc4f85b95e6f20c23ec" +dependencies = [ + "bstr", + "gix-config 0.36.1", "gix-path", - "gix-pathspec", - "gix-refspec", - "gix-url", + "gix-pathspec 0.7.4", + "gix-refspec 0.23.0", + "gix-url 0.27.3", "thiserror", ] @@ -1180,7 +1800,23 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ae0978f3e11dc57290ee75ac2477c815bca1ce2fa7ed5dc5f16db067410ac4d" dependencies = [ - "gix-fs", + "gix-fs 0.7.0", + "libc", + "once_cell", + "parking_lot", + "signal-hook", + "signal-hook-registry", + "tempfile", +] + +[[package]] +name = "gix-tempfile" +version = "13.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a761d76594f4443b675e85928e4902dec333273836bd386906f01e7e346a0d11" +dependencies = [ + "dashmap", + "gix-fs 0.10.2", "libc", "once_cell", "parking_lot", @@ -1201,12 +1837,29 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ef04ab3643acba289b5cedd25d6f53c0430770b1d689d1d654511e6fb81ba0" dependencies = [ - "gix-commitgraph", + "gix-commitgraph 0.21.0", "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", + "gix-hash 0.13.3", + "gix-hashtable 0.4.1", + "gix-object 0.37.0", + "gix-revwalk 0.8.0", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-traverse" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4029ec209b0cc480d209da3837a42c63801dd8548f09c1f4502c60accb62aeb" +dependencies = [ + "bitflags 2.5.0", + "gix-commitgraph 0.24.2", + "gix-date", + "gix-hash 0.14.2", + "gix-hashtable 0.5.2", + "gix-object 0.42.1", + "gix-revwalk 0.13.0", "smallvec", "thiserror", ] @@ -1218,7 +1871,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6125ecf46e8c68bf7202da6cad239831daebf0247ffbab30210d72f3856e420f" dependencies = [ "bstr", - "gix-features", + "gix-features 0.35.0", + "gix-path", + "home", + "thiserror", + "url", +] + +[[package]] +name = "gix-url" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0db829ebdca6180fbe32be7aed393591df6db4a72dbbc0b8369162390954d1cf" +dependencies = [ + "bstr", + "gix-features 0.38.1", "gix-path", "home", "thiserror", @@ -1231,6 +1898,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35192df7fd0fa112263bad8021e2df7167df4cc2a6e6d15892e1e55621d3d4dc" dependencies = [ + "bstr", "fastrand", "unicode-normalization", ] @@ -1252,14 +1920,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f5e32972801bd82d56609e6fc84efc358fa1f11f25c5e83b7807ee2280f14fe" dependencies = [ "bstr", - "gix-attributes", - "gix-features", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-ignore", - "gix-index", - "gix-object", + "gix-attributes 0.19.0", + "gix-features 0.35.0", + "gix-fs 0.7.0", + "gix-glob 0.13.0", + "gix-hash 0.13.3", + "gix-ignore 0.8.0", + "gix-index 0.25.0", + "gix-object 0.37.0", + "gix-path", +] + +[[package]] +name = "gix-worktree" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f06ca5dd164678914fc9280ba9d1ffeb66499ccc16ab1278c513828beee88401" +dependencies = [ + "bstr", + "gix-attributes 0.22.2", + "gix-features 0.38.1", + "gix-fs 0.10.2", + "gix-glob 0.16.2", + "gix-hash 0.14.2", + "gix-ignore 0.11.2", + "gix-index 0.32.1", + "gix-object 0.42.1", "gix-path", ] @@ -1270,15 +1956,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3aeb06960f2c5ac9e4cdb6b38eb3c2b99d5e525e68285fef21ed17dfbd597ad" dependencies = [ "bstr", - "gix-features", - "gix-filter", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-index", - "gix-object", + "gix-features 0.35.0", + "gix-filter 0.5.0", + "gix-fs 0.7.0", + "gix-glob 0.13.0", + "gix-hash 0.13.3", + "gix-index 0.25.0", + "gix-object 0.37.0", "gix-path", - "gix-worktree", + "gix-worktree 0.26.0", + "io-close", + "thiserror", +] + +[[package]] +name = "gix-worktree-state" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70b4bcac42d5b3197d38e3f15f6eb277c5e6d6a1669c7beabed8f666dba1c9b8" +dependencies = [ + "bstr", + "gix-features 0.38.1", + "gix-filter 0.11.1", + "gix-fs 0.10.2", + "gix-glob 0.16.2", + "gix-hash 0.14.2", + "gix-index 0.32.1", + "gix-object 0.42.1", + "gix-path", + "gix-worktree 0.33.1", "io-close", "thiserror", ] @@ -1289,14 +1995,32 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c89fe93a12e45cc3ad6ba429a7dd7506b03d7d406374a65ad9998b5cb2627569" dependencies = [ - "gix-attributes", - "gix-features", - "gix-filter", - "gix-fs", - "gix-hash", - "gix-object", + "gix-attributes 0.19.0", + "gix-features 0.35.0", + "gix-filter 0.5.0", + "gix-fs 0.7.0", + "gix-hash 0.13.3", + "gix-object 0.37.0", "gix-path", - "gix-traverse", + "gix-traverse 0.33.0", + "parking_lot", + "thiserror", +] + +[[package]] +name = "gix-worktree-stream" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e73f7f8c1354516339a244f61f0fe3080b4cf25ddcbcfefd2d56661d51e88d4" +dependencies = [ + "gix-attributes 0.22.2", + "gix-features 0.38.1", + "gix-filter 0.11.1", + "gix-fs 0.10.2", + "gix-hash 0.14.2", + "gix-object 0.42.1", + "gix-path", + "gix-traverse 0.39.0", "parking_lot", "thiserror", ] @@ -1312,6 +2036,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 = "heck" @@ -1408,6 +2136,15 @@ dependencies = [ "rayon", ] +[[package]] +name = "kstring" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747" +dependencies = [ + "static_assertions", +] + [[package]] name = "libc" version = "0.2.154" @@ -1455,6 +2192,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "miniz_oxide" version = "0.7.2" @@ -1620,13 +2366,23 @@ dependencies = [ "human_format", ] +[[package]] +name = "prodash" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744a264d26b88a6a7e37cbad97953fa233b94d585236310bcbc88474b4092d79" +dependencies = [ + "bytesize", + "human_format", +] + [[package]] name = "project-base-directory" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cac03b4d8134a70a5344f59d26d024d1895f4f095ad36675ec20391e148fd8b" dependencies = [ - "gix", + "gix 0.54.1", "serde", "thiserror", "tokio", @@ -1816,6 +2572,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[package]] name = "signal-hook" version = "0.3.17" @@ -1851,6 +2613,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[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.11.1" diff --git a/Cargo.toml b/Cargo.toml index 7b2840f..7d033ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ anyhow = "1.0.59" cargo-lock = "8.0.3" cargo_metadata = "0.15.3" cargo_toml = "0.15.2" +gix = "0.62.0" memmap = "0.7.0" parking_lot = "0.12.1" project-base-directory = "0.3.0" diff --git a/src/app.rs b/src/app.rs index 91689c3..ad51741 100644 --- a/src/app.rs +++ b/src/app.rs @@ -6,6 +6,7 @@ use bomper::{ cargo::CargoReplacer, search::SearchReplacer, simple::SimpleReplacer, Replacer, VersionReplacement, }, + versioning::get_latest_tag, }; pub struct App { @@ -33,6 +34,9 @@ impl App { impl App { pub fn bump(&self, _opts: &Bump) -> Result<()> { + let repo = gix::discover(".")?; + + let tag = get_latest_tag(&repo)?; todo!() } diff --git a/src/error.rs b/src/error.rs index c2d4ef9..2bcb9a5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -21,6 +21,12 @@ pub enum Error { #[error(transparent)] SemverParse(#[from] semver::Error), #[error(transparent)] + GixDiscover(#[from] gix::discover::Error), + #[error(transparent)] + GixRef(#[from] gix::reference::iter::Error), + #[error(transparent)] + GixRefInit(#[from] gix::reference::iter::init::Error), + #[error(transparent)] Other(#[from] anyhow::Error), #[error("invalid version: {0}")] TomlSerialize(#[from] toml::ser::Error), @@ -33,6 +39,8 @@ pub enum Error { InvalidCargoToml(cargo_metadata::camino::Utf8PathBuf), #[error("unable to determine project base directory")] ProjectBaseDirectory, + #[error("unable to determine the most recent tag")] + TagError, } impl std::fmt::Debug for Error { diff --git a/src/lib.rs b/src/lib.rs index c0f8d46..1378cc2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,8 @@ +#![allow(clippy::result_large_err)] pub mod config; pub mod error; pub mod replacers; +pub mod versioning; #[cfg(test)] mod tests; diff --git a/src/main.rs b/src/main.rs index c91edd8..dd542d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,7 @@ use cli::{Args, Commands}; fn main() -> Result<(), Box> { let args = Args::parse(); - let app = App::new(args.base_args)?; + let app = App::new(args.base_args).map_err(|_| "Failed to load configuration")?; match args.command { Commands::RawBump(raw_bump) => { app.raw_bump(&raw_bump)?; diff --git a/src/versioning.rs b/src/versioning.rs new file mode 100644 index 0000000..568e9b3 --- /dev/null +++ b/src/versioning.rs @@ -0,0 +1,42 @@ +use crate::error::{Error, Result}; + +#[derive(Clone, Debug, Eq)] +pub struct Tag { + pub version: semver::Version, +} + +impl Ord for Tag { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.version.cmp(&other.version) + } +} + +impl PartialOrd for Tag { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.version.cmp(&other.version)) + } +} + +impl PartialEq for Tag { + fn eq(&self, other: &Self) -> bool { + self.version == other.version + } +} + +pub fn get_latest_tag(repo: &gix::Repository) -> Result { + // TODO: should we only look for tags that are from the current branch? + // TODO: should we ignore tags that are not semver? + let references = repo.references()?; + let tags = references.tags()?; + let tag = tags + .filter_map(|tag| { + let tag = tag.ok()?; + let name = tag.name().shorten().to_string(); + let version = semver::Version::parse(&name).unwrap(); + Some(Tag { version }) + }) + .max() + .ok_or_else(|| Error::TagError)?; + + Ok(tag) +}