diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cf081ea3ae5..9946b189a3f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,25 @@ version: 2 updates: - # We only use Dependabot *version* updates for GitHub Actions. Rust dependencies are checked via - # `cargo deny` and manually updated (see https://github.com/GitoxideLabs/gitoxide/issues/144), or - # by Dependabot *security* updates (which don't need the `cargo` ecosystem to be listed here). + - package-ecosystem: cargo + directory: '/' + schedule: + interval: monthly + commit-message: + # Avoid non-"purposeful" prefix due to Dependabot misdetecting style (see `DEVELOPMENT.md`). + prefix: '' + allow: + - dependency-type: all + groups: + cargo: + patterns: ['*'] + - package-ecosystem: github-actions directory: '/' schedule: interval: weekly + commit-message: + # Avoid non-"purposeful" prefix due to Dependabot misdetecting style (see `DEVELOPMENT.md`). + prefix: '' groups: github-actions: patterns: ['*'] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26d4755da19..8728d06747f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: continue-on-error: true - name: Check for unrecognized *-sys dependencies run: | - ! grep -qP '(? + +### Other + + - Add missing command docs + small style fixups + Changes that affect the help/usage text shown at runtime: + + - Add descriptions for a few `gix` commands that didn't have it: + `gix is-clean`, `gix is-changed`, and `gix env`. + + - Add a description of the debug-only `ein panic` command. + + - Small spacing and capitalization improvements for consistency. + + - Add a line break in a `///` block for brevity of the top line. + + Changes to code style that do not affect what is shown at runtime: + + - Add `.` at the end of some `///` first lines. (This doesn't + affect runtime behavior because `clap` normalizes this away.) + + - Put `///` above all `#[...]` in a few places where it wasn't. + + - Adjust comment wrapping in a couple of places for clarity. + +### Commit Statistics + + + + - 4 commits contributed to the release. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Merge pull request #1937 from EliahKagan/document-commands ([`de2f97d`](https://github.com/GitoxideLabs/gitoxide/commit/de2f97d793d8675659020883a04f47fc9ff06471)) + - Add missing command docs + small style fixups ([`f952c10`](https://github.com/GitoxideLabs/gitoxide/commit/f952c101cc8686e685074e8604e0f332c06d6767)) +
+ ## 0.42.0 (2025-04-04) diff --git a/Cargo.lock b/Cargo.lock index f33ebb2f637..6120ccab95c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "arbitrary" @@ -177,14 +177,15 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", + "pin-project-lite", "slab", ] @@ -285,7 +286,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -302,9 +303,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.12.6" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878" dependencies = [ "aws-lc-sys", "zeroize", @@ -312,9 +313,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.27.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77926887776171ced7d662120a75998e444d3750c951abfe07f90da130514b1f" +checksum = "bfa9b6986f250236c27e5a204062434a773a13243d2ffc2955f37bdba4c5c6a1" dependencies = [ "bindgen", "cc", @@ -363,7 +364,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.100", + "syn 2.0.101", "which", ] @@ -406,9 +407,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", "regex-automata", @@ -421,6 +422,12 @@ version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.10.1" @@ -429,9 +436,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bytesize" -version = "1.3.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2c12f985c78475a6b8d629afd0c360260ef34cfef52efccdcfd31972f81c2e" +checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" dependencies = [ "serde", ] @@ -465,9 +472,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.16" +version = "1.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" dependencies = [ "jobserver", "libc", @@ -541,9 +548,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.32" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", "clap_derive", @@ -551,9 +558,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.32" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -563,9 +570,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.46" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5c5508ea23c5366f77e53f5a0070e5a84e51687ec3ef9e0464c86dc8d13ce98" +checksum = "be8c97f3a6f02b9e24cadc12aaba75201d18754b53ea0a9d99642f806ccdb4c9" dependencies = [ "clap", ] @@ -579,7 +586,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -762,9 +769,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] @@ -912,15 +919,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "930c7171c8df9fb1782bdf9b918ed9ed2d33d1d22300abb754f9085bc48bf8e8" -[[package]] -name = "deranged" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" -dependencies = [ - "powerfmt", -] - [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -929,7 +927,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -956,7 +954,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -995,16 +993,26 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", +] + [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ - "humantime", - "is-terminal", + "anstream", + "anstyle", + "env_filter", + "jiff", "log", - "termcolor", ] [[package]] @@ -1015,9 +1023,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", @@ -1042,9 +1050,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ "event-listener 5.4.0", "pin-project-lite", @@ -1076,10 +1084,11 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "faster-hex" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" +checksum = "7223ae2d2f179b803433d9c830478527e92b8117eab39460edae7f1614d9fb73" dependencies = [ + "heapless", "serde", ] @@ -1103,14 +1112,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" +checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", - "libz-ng-sys", "libz-rs-sys", - "libz-sys", "miniz_oxide", ] @@ -1152,9 +1159,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.11.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +checksum = "1f89bda4c2a21204059a977ed3bfe746677dfd137b83c339e702b0ac91d482aa" dependencies = [ "autocfg", ] @@ -1300,7 +1307,7 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gitoxide" -version = "0.42.0" +version = "0.44.0" dependencies = [ "anyhow", "clap", @@ -1311,10 +1318,10 @@ dependencies = [ "futures-lite", "gitoxide-core", "gix", - "gix-features 0.41.0", + "gix-features", "is-terminal", "once_cell", - "prodash 29.0.1", + "prodash", "serde_derive", "terminal_size", "tracing", @@ -1324,7 +1331,7 @@ dependencies = [ [[package]] name = "gitoxide-core" -version = "0.46.0" +version = "0.47.1" dependencies = [ "anyhow", "async-io", @@ -1362,60 +1369,60 @@ dependencies = [ [[package]] name = "gix" -version = "0.71.0" +version = "0.72.1" dependencies = [ "anyhow", "async-std", "document-features", "gix", - "gix-actor 0.34.0", + "gix-actor", "gix-archive", - "gix-attributes 0.25.0", + "gix-attributes", "gix-blame", "gix-command", - "gix-commitgraph 0.27.0", + "gix-commitgraph", "gix-config", "gix-credentials", - "gix-date 0.9.4", + "gix-date", "gix-diff", "gix-dir", - "gix-discover 0.39.0", - "gix-features 0.41.0", + "gix-discover", + "gix-features", "gix-filter", - "gix-fs 0.14.0", - "gix-glob 0.19.0", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-ignore 0.14.0", - "gix-index 0.39.0", - "gix-lock 17.0.0", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-hashtable", + "gix-ignore", + "gix-index", + "gix-lock", "gix-mailmap", "gix-merge", "gix-negotiate", - "gix-object 0.48.0", + "gix-object", "gix-odb", "gix-pack", - "gix-path 0.10.15", + "gix-path", "gix-pathspec", "gix-prompt", "gix-protocol", - "gix-ref 0.51.0", + "gix-ref", "gix-refspec", "gix-revision", - "gix-revwalk 0.19.0", - "gix-sec 0.10.11", + "gix-revwalk", + "gix-sec", "gix-shallow", "gix-status", "gix-submodule", - "gix-tempfile 17.0.0", + "gix-tempfile", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", "gix-transport", - "gix-traverse 0.45.0", + "gix-traverse", "gix-url", - "gix-utils 0.2.0", - "gix-validate 0.9.4", - "gix-worktree 0.40.0", + "gix-utils", + "gix-validate", + "gix-worktree", "gix-worktree-state", "gix-worktree-stream", "insta", @@ -1423,7 +1430,7 @@ dependencies = [ "once_cell", "parking_lot", "pretty_assertions", - "prodash 29.0.1", + "prodash", "regex", "serde", "serial_test", @@ -1436,51 +1443,37 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e454357e34b833cc3a00b6efbbd3dd4d18b24b9fb0c023876ec2645e8aa3f2" -dependencies = [ - "bstr", - "gix-date 0.8.7", - "gix-utils 0.1.14", - "itoa", - "thiserror 1.0.69", - "winnow 0.6.26", -] - -[[package]] -name = "gix-actor" -version = "0.34.0" +version = "0.35.1" dependencies = [ "bstr", "document-features", - "gix-date 0.9.4", - "gix-hash 0.17.0", + "gix-date", + "gix-hash", "gix-testtools", - "gix-utils 0.2.0", + "gix-utils", "itoa", "pretty_assertions", "serde", "thiserror 2.0.12", - "winnow 0.7.4", + "winnow", ] [[package]] name = "gix-archive" -version = "0.20.0" +version = "0.21.1" dependencies = [ "bstr", "document-features", "flate2", - "gix-attributes 0.25.0", - "gix-date 0.9.4", + "gix-attributes", + "gix-date", "gix-filter", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-hash", + "gix-object", "gix-odb", - "gix-path 0.10.15", + "gix-path", "gix-testtools", - "gix-worktree 0.40.0", + "gix-worktree", "gix-worktree-stream", "jiff", "tar", @@ -1490,33 +1483,16 @@ dependencies = [ [[package]] name = "gix-attributes" -version = "0.22.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebccbf25aa4a973dd352564a9000af69edca90623e8a16dad9cbc03713131311" -dependencies = [ - "bstr", - "gix-glob 0.16.5", - "gix-path 0.10.14", - "gix-quote 0.4.15", - "gix-trace 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "kstring", - "smallvec", - "thiserror 1.0.69", - "unicode-bom", -] - -[[package]] -name = "gix-attributes" -version = "0.25.0" +version = "0.26.0" dependencies = [ "bstr", "document-features", - "gix-fs 0.14.0", - "gix-glob 0.19.0", - "gix-path 0.10.15", - "gix-quote 0.5.0", + "gix-fs", + "gix-glob", + "gix-path", + "gix-quote", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", "kstring", "serde", "smallvec", @@ -1532,34 +1508,26 @@ dependencies = [ "thiserror 2.0.12", ] -[[package]] -name = "gix-bitmap" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540" -dependencies = [ - "thiserror 2.0.12", -] - [[package]] name = "gix-blame" -version = "0.1.0" +version = "0.2.1" dependencies = [ - "gix-commitgraph 0.27.0", - "gix-date 0.9.4", + "gix-commitgraph", + "gix-date", "gix-diff", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", "gix-odb", - "gix-ref 0.51.0", - "gix-revwalk 0.19.0", + "gix-ref", + "gix-revwalk", "gix-testtools", - "gix-trace 0.1.12", - "gix-traverse 0.45.0", - "gix-worktree 0.40.0", + "gix-trace", + "gix-traverse", + "gix-worktree", + "pretty_assertions", "smallvec", "thiserror 2.0.12", ] @@ -1571,51 +1539,28 @@ dependencies = [ "thiserror 2.0.12", ] -[[package]] -name = "gix-chunk" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f" -dependencies = [ - "thiserror 2.0.12", -] - [[package]] name = "gix-command" -version = "0.5.0" +version = "0.6.0" dependencies = [ "bstr", - "gix-path 0.10.15", - "gix-quote 0.5.0", + "gix-path", + "gix-quote", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", "once_cell", "shell-words", ] [[package]] name = "gix-commitgraph" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133b06f67f565836ec0c473e2116a60fb74f80b6435e21d88013ac0e3c60fc78" -dependencies = [ - "bstr", - "gix-chunk 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "gix-features 0.38.2", - "gix-hash 0.14.2", - "memmap2", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-commitgraph" -version = "0.27.0" +version = "0.28.0" dependencies = [ "bstr", "document-features", - "gix-chunk 0.4.11", - "gix-date 0.9.4", - "gix-hash 0.17.0", + "gix-chunk", + "gix-date", + "gix-hash", "gix-testtools", "memmap2", "serde", @@ -1624,24 +1569,24 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.44.0" +version = "0.45.1" dependencies = [ "bstr", "criterion", "document-features", "gix-config-value", - "gix-features 0.41.0", - "gix-glob 0.19.0", - "gix-path 0.10.15", - "gix-ref 0.51.0", - "gix-sec 0.10.11", + "gix-features", + "gix-glob", + "gix-path", + "gix-ref", + "gix-sec", "memchr", "once_cell", "serde", "smallvec", "thiserror 2.0.12", "unicode-bom", - "winnow 0.7.4", + "winnow", ] [[package]] @@ -1652,21 +1597,21 @@ dependencies = [ "bytesize", "cap", "gix-config", - "gix-path 0.10.15", - "gix-ref 0.51.0", - "gix-sec 0.10.11", + "gix-path", + "gix-ref", + "gix-sec", "gix-testtools", "serial_test", ] [[package]] name = "gix-config-value" -version = "0.14.12" +version = "0.15.0" dependencies = [ "bitflags 2.9.0", "bstr", "document-features", - "gix-path 0.10.15", + "gix-path", "libc", "serde", "thiserror 2.0.12", @@ -1674,17 +1619,17 @@ dependencies = [ [[package]] name = "gix-credentials" -version = "0.28.0" +version = "0.29.0" dependencies = [ "bstr", "document-features", "gix-command", "gix-config-value", - "gix-path 0.10.15", + "gix-path", "gix-prompt", - "gix-sec 0.10.11", + "gix-sec", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", "gix-url", "once_cell", "serde", @@ -1693,52 +1638,41 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eed6931f21491ee0aeb922751bd7ec97b4b2fe8fbfedcb678e2a2dce5f3b8c0" -dependencies = [ - "bstr", - "itoa", - "thiserror 1.0.69", - "time", -] - -[[package]] -name = "gix-date" -version = "0.9.4" +version = "0.10.2" dependencies = [ "bstr", "document-features", - "gix-hash 0.17.0", + "gix-hash", "gix-testtools", "itoa", "jiff", "once_cell", "pretty_assertions", "serde", + "smallvec", "thiserror 2.0.12", ] [[package]] name = "gix-diff" -version = "0.51.0" +version = "0.52.1" dependencies = [ "bstr", "document-features", "getrandom 0.2.15", - "gix-attributes 0.25.0", + "gix-attributes", "gix-command", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", - "gix-path 0.10.15", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", "gix-pathspec", - "gix-tempfile 17.0.0", - "gix-trace 0.1.12", - "gix-traverse 0.45.0", - "gix-worktree 0.40.0", + "gix-tempfile", + "gix-trace", + "gix-traverse", + "gix-worktree", "imara-diff", "serde", "thiserror 2.0.12", @@ -1750,15 +1684,15 @@ version = "0.0.0" dependencies = [ "gix-diff", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", "gix-odb", "gix-pathspec", "gix-testtools", - "gix-traverse 0.45.0", - "gix-worktree 0.40.0", + "gix-traverse", + "gix-worktree", "insta", "pretty_assertions", "shell-words", @@ -1766,52 +1700,36 @@ dependencies = [ [[package]] name = "gix-dir" -version = "0.13.0" +version = "0.14.1" dependencies = [ "bstr", - "gix-discover 0.39.0", - "gix-fs 0.14.0", - "gix-ignore 0.14.0", - "gix-index 0.39.0", - "gix-object 0.48.0", - "gix-path 0.10.15", + "gix-discover", + "gix-fs", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", "gix-pathspec", "gix-testtools", - "gix-trace 0.1.12", - "gix-utils 0.2.0", - "gix-worktree 0.40.0", + "gix-trace", + "gix-utils", + "gix-worktree", "pretty_assertions", "thiserror 2.0.12", ] [[package]] name = "gix-discover" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc27c699b63da66b50d50c00668bc0b7e90c3a382ef302865e891559935f3dbf" -dependencies = [ - "bstr", - "dunce", - "gix-fs 0.11.3", - "gix-hash 0.14.2", - "gix-path 0.10.14", - "gix-ref 0.44.1", - "gix-sec 0.10.11 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-discover" -version = "0.39.0" +version = "0.40.1" dependencies = [ "bstr", "defer", "dunce", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-path 0.10.15", - "gix-ref 0.51.0", - "gix-sec 0.10.11", + "gix-fs", + "gix-hash", + "gix-path", + "gix-ref", + "gix-sec", "gix-testtools", "is_ci", "serial_test", @@ -1821,22 +1739,7 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.38.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac7045ac9fe5f9c727f38799d002a7ed3583cd777e3322a7c4b43e3cf437dc69" -dependencies = [ - "gix-hash 0.14.2", - "gix-trace 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "gix-utils 0.1.14", - "libc", - "prodash 28.0.0", - "sha1_smol", - "walkdir", -] - -[[package]] -name = "gix-features" -version = "0.41.0" +version = "0.42.1" dependencies = [ "bstr", "bytes", @@ -1845,12 +1748,13 @@ dependencies = [ "crossbeam-channel", "document-features", "flate2", - "gix-trace 0.1.12", - "gix-utils 0.2.0", + "gix-path", + "gix-trace", + "gix-utils", "libc", "once_cell", "parking_lot", - "prodash 29.0.1", + "prodash", "thiserror 2.0.12", "walkdir", ] @@ -1861,21 +1765,21 @@ version = "0.0.0" [[package]] name = "gix-filter" -version = "0.18.0" +version = "0.19.1" dependencies = [ "bstr", "encoding_rs", - "gix-attributes 0.25.0", + "gix-attributes", "gix-command", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-hash", + "gix-object", "gix-packetline-blocking", - "gix-path 0.10.15", - "gix-quote 0.5.0", + "gix-path", + "gix-quote", "gix-testtools", - "gix-trace 0.1.12", - "gix-utils 0.2.0", - "gix-worktree 0.40.0", + "gix-trace", + "gix-utils", + "gix-worktree", "serial_test", "smallvec", "thiserror 2.0.12", @@ -1883,25 +1787,14 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2bfe6249cfea6d0c0e0990d5226a4cb36f030444ba9e35e0639275db8f98575" -dependencies = [ - "fastrand", - "gix-features 0.38.2", - "gix-utils 0.1.14", -] - -[[package]] -name = "gix-fs" -version = "0.14.0" +version = "0.15.0" dependencies = [ "bstr", "crossbeam-channel", "fastrand", - "gix-features 0.41.0", - "gix-path 0.10.15", - "gix-utils 0.2.0", + "gix-features", + "gix-path", + "gix-utils", "is_ci", "serde", "tempfile", @@ -1910,57 +1803,35 @@ dependencies = [ [[package]] name = "gix-fsck" -version = "0.10.0" +version = "0.11.1" dependencies = [ - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-object 0.48.0", + "gix-hash", + "gix-hashtable", + "gix-object", "gix-odb", "gix-testtools", ] [[package]] name = "gix-glob" -version = "0.16.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74908b4bbc0a0a40852737e5d7889f676f081e340d5451a16e5b4c50d592f111" -dependencies = [ - "bitflags 2.9.0", - "bstr", - "gix-features 0.38.2", - "gix-path 0.10.14", -] - -[[package]] -name = "gix-glob" -version = "0.19.0" +version = "0.20.0" dependencies = [ "bitflags 2.9.0", "bstr", "document-features", - "gix-features 0.41.0", - "gix-path 0.10.15", + "gix-features", + "gix-path", "gix-testtools", "serde", ] [[package]] name = "gix-hash" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93d7df7366121b5018f947a04d37f034717e113dcf9ccd85c34b58e57a74d5e" -dependencies = [ - "faster-hex", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-hash" -version = "0.17.0" +version = "0.18.0" dependencies = [ "document-features", "faster-hex", - "gix-features 0.41.0", + "gix-features", "gix-testtools", "serde", "sha1-checked", @@ -1969,104 +1840,52 @@ dependencies = [ [[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", -] - -[[package]] -name = "gix-hashtable" -version = "0.8.0" +version = "0.8.1" dependencies = [ - "gix-hash 0.17.0", + "gix-hash", "hashbrown 0.14.5", "parking_lot", ] [[package]] name = "gix-ignore" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e447cd96598460f5906a0f6c75e950a39f98c2705fc755ad2f2020c9e937fab7" -dependencies = [ - "bstr", - "gix-glob 0.16.5", - "gix-path 0.10.14", - "gix-trace 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bom", -] - -[[package]] -name = "gix-ignore" -version = "0.14.0" +version = "0.15.0" dependencies = [ "bstr", "document-features", - "gix-fs 0.14.0", - "gix-glob 0.19.0", - "gix-path 0.10.15", + "gix-fs", + "gix-glob", + "gix-path", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", "serde", "unicode-bom", ] [[package]] name = "gix-index" -version = "0.33.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9a44eb55bd84bb48f8a44980e951968ced21e171b22d115d1cdcef82a7d73f" -dependencies = [ - "bitflags 2.9.0", - "bstr", - "filetime", - "fnv", - "gix-bitmap 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "gix-features 0.38.2", - "gix-fs 0.11.3", - "gix-hash 0.14.2", - "gix-lock 14.0.0", - "gix-object 0.42.3", - "gix-traverse 0.39.2", - "gix-utils 0.1.14", - "gix-validate 0.8.5", - "hashbrown 0.14.5", - "itoa", - "libc", - "memmap2", - "rustix 0.38.44", - "smallvec", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-index" -version = "0.39.0" +version = "0.40.1" dependencies = [ "bitflags 2.9.0", "bstr", "document-features", "filetime", "fnv", - "gix-bitmap 0.2.14", - "gix-features 0.41.0", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-lock 17.0.0", - "gix-object 0.48.0", + "gix-bitmap", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", "gix-testtools", - "gix-traverse 0.45.0", - "gix-utils 0.2.0", - "gix-validate 0.9.4", + "gix-traverse", + "gix-utils", + "gix-validate", "hashbrown 0.14.5", "itoa", "libc", "memmap2", - "rustix 0.38.44", + "rustix 1.0.7", "serde", "smallvec", "thiserror 2.0.12", @@ -2078,10 +1897,10 @@ version = "0.0.0" dependencies = [ "bstr", "filetime", - "gix-features 0.41.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-features", + "gix-hash", + "gix-index", + "gix-object", "gix-odb", "gix-testtools", ] @@ -2092,21 +1911,10 @@ version = "0.0.0" [[package]] name = "gix-lock" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bc7fe297f1f4614774989c00ec8b1add59571dc9b024b4c00acb7dedd4e19d" +version = "17.1.0" dependencies = [ - "gix-tempfile 14.0.2", - "gix-utils 0.1.14", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-lock" -version = "17.0.0" -dependencies = [ - "gix-tempfile 17.0.0", - "gix-utils 0.2.0", + "gix-tempfile", + "gix-utils", "tempfile", "thiserror 2.0.12", ] @@ -2117,18 +1925,18 @@ version = "0.1.5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "trybuild", ] [[package]] name = "gix-mailmap" -version = "0.26.0" +version = "0.27.1" dependencies = [ "bstr", "document-features", - "gix-actor 0.34.0", - "gix-date 0.9.4", + "gix-actor", + "gix-date", "gix-testtools", "serde", "thiserror 2.0.12", @@ -2136,27 +1944,27 @@ dependencies = [ [[package]] name = "gix-merge" -version = "0.4.0" +version = "0.5.1" dependencies = [ "bstr", "document-features", "gix-command", "gix-diff", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", "gix-odb", - "gix-path 0.10.15", - "gix-quote 0.5.0", + "gix-path", + "gix-quote", "gix-revision", - "gix-revwalk 0.19.0", - "gix-tempfile 17.0.0", + "gix-revwalk", + "gix-tempfile", "gix-testtools", - "gix-trace 0.1.12", - "gix-utils 0.2.0", - "gix-worktree 0.40.0", + "gix-trace", + "gix-utils", + "gix-worktree", "imara-diff", "pretty_assertions", "serde", @@ -2166,16 +1974,16 @@ dependencies = [ [[package]] name = "gix-negotiate" -version = "0.19.0" +version = "0.20.1" dependencies = [ "bitflags 2.9.0", - "gix-commitgraph 0.27.0", - "gix-date 0.9.4", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-object", "gix-odb", - "gix-ref 0.51.0", - "gix-revwalk 0.19.0", + "gix-ref", + "gix-revwalk", "gix-testtools", "smallvec", "thiserror 2.0.12", @@ -2187,64 +1995,45 @@ version = "0.0.0" [[package]] name = "gix-object" -version = "0.42.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25da2f46b4e7c2fa7b413ce4dffb87f69eaf89c2057e386491f4c55cadbfe386" -dependencies = [ - "bstr", - "gix-actor 0.31.5", - "gix-date 0.8.7", - "gix-features 0.38.2", - "gix-hash 0.14.2", - "gix-utils 0.1.14", - "gix-validate 0.8.5", - "itoa", - "smallvec", - "thiserror 1.0.69", - "winnow 0.6.26", -] - -[[package]] -name = "gix-object" -version = "0.48.0" +version = "0.49.1" dependencies = [ "bstr", "criterion", "document-features", - "gix-actor 0.34.0", - "gix-date 0.9.4", - "gix-features 0.41.0", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", + "gix-actor", + "gix-date", + "gix-features", + "gix-hash", + "gix-hashtable", "gix-odb", - "gix-path 0.10.15", + "gix-path", "gix-testtools", - "gix-utils 0.2.0", - "gix-validate 0.9.4", + "gix-utils", + "gix-validate", "itoa", "pretty_assertions", "serde", "smallvec", "termtree", "thiserror 2.0.12", - "winnow 0.7.4", + "winnow", ] [[package]] name = "gix-odb" -version = "0.68.0" +version = "0.69.1" dependencies = [ "arc-swap", "document-features", - "gix-date 0.9.4", - "gix-features 0.41.0", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-object 0.48.0", + "gix-date", + "gix-features", + "gix-fs", + "gix-hash", + "gix-hashtable", + "gix-object", "gix-pack", - "gix-path 0.10.15", - "gix-quote 0.5.0", + "gix-path", + "gix-quote", "parking_lot", "serde", "tempfile", @@ -2257,11 +2046,11 @@ version = "0.0.0" dependencies = [ "crossbeam-channel", "filetime", - "gix-actor 0.34.0", - "gix-date 0.9.4", - "gix-features 0.41.0", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-actor", + "gix-date", + "gix-features", + "gix-hash", + "gix-object", "gix-odb", "gix-pack", "gix-testtools", @@ -2271,20 +2060,20 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.58.0" +version = "0.59.1" dependencies = [ "clru", "document-features", - "gix-chunk 0.4.11", + "gix-chunk", "gix-diff", - "gix-features 0.41.0", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-object 0.48.0", - "gix-path 0.10.15", - "gix-tempfile 17.0.0", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-path", + "gix-tempfile", "gix-testtools", - "gix-traverse 0.45.0", + "gix-traverse", "memmap2", "parking_lot", "serde", @@ -2298,20 +2087,20 @@ name = "gix-pack-tests" version = "0.0.0" dependencies = [ "bstr", - "gix-features 0.41.0", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-features", + "gix-hash", + "gix-object", "gix-odb", "gix-pack", "gix-testtools", - "gix-traverse 0.45.0", + "gix-traverse", "maplit", "memmap2", ] [[package]] name = "gix-packetline" -version = "0.18.4" +version = "0.19.0" dependencies = [ "async-std", "bstr", @@ -2319,10 +2108,10 @@ dependencies = [ "faster-hex", "futures-io", "futures-lite", - "gix-hash 0.17.0", + "gix-hash", "gix-odb", "gix-pack", - "gix-trace 0.1.12", + "gix-trace", "maybe-async", "pin-project-lite", "serde", @@ -2331,55 +2120,43 @@ dependencies = [ [[package]] name = "gix-packetline-blocking" -version = "0.18.3" +version = "0.19.0" dependencies = [ "bstr", "document-features", "faster-hex", - "gix-trace 0.1.12", + "gix-trace", "serde", "thiserror 2.0.12", ] [[package]] name = "gix-path" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40f12bb65a8299be0cfb90fe718e3be236b7a94b434877012980863a883a99f" -dependencies = [ - "bstr", - "gix-trace 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "home", - "once_cell", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-path" -version = "0.10.15" +version = "0.10.18" dependencies = [ "bstr", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", + "gix-validate", "home", "known-folders", "once_cell", "serial_test", "thiserror 2.0.12", - "windows 0.58.0", + "windows 0.61.1", "winreg", ] [[package]] name = "gix-pathspec" -version = "0.10.0" +version = "0.11.0" dependencies = [ "bitflags 2.9.0", "bstr", - "gix-attributes 0.25.0", + "gix-attributes", "gix-config-value", - "gix-glob 0.19.0", - "gix-path 0.10.15", + "gix-glob", + "gix-path", "gix-testtools", "once_cell", "serial_test", @@ -2388,21 +2165,21 @@ dependencies = [ [[package]] name = "gix-prompt" -version = "0.10.0" +version = "0.11.0" dependencies = [ "expectrl", "gix-command", "gix-config-value", "gix-testtools", "parking_lot", - "rustix 0.38.44", + "rustix 1.0.7", "serial_test", "thiserror 2.0.12", ] [[package]] name = "gix-protocol" -version = "0.49.0" +version = "0.50.1" dependencies = [ "async-std", "async-trait", @@ -2411,43 +2188,32 @@ dependencies = [ "futures-io", "futures-lite", "gix-credentials", - "gix-date 0.9.4", - "gix-features 0.41.0", - "gix-hash 0.17.0", - "gix-lock 17.0.0", + "gix-date", + "gix-features", + "gix-hash", + "gix-lock", "gix-negotiate", - "gix-object 0.48.0", + "gix-object", "gix-packetline", - "gix-ref 0.51.0", + "gix-ref", "gix-refspec", - "gix-revwalk 0.19.0", + "gix-revwalk", "gix-shallow", - "gix-trace 0.1.12", + "gix-trace", "gix-transport", - "gix-utils 0.2.0", + "gix-utils", "maybe-async", "serde", "thiserror 2.0.12", - "winnow 0.7.4", + "winnow", ] [[package]] name = "gix-quote" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49357fccdb0c85c0d3a3292a9f6db32d9b3535959b5471bb9624908f4a066c6" -dependencies = [ - "bstr", - "gix-utils 0.1.14", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-quote" -version = "0.5.0" +version = "0.6.0" dependencies = [ "bstr", - "gix-utils 0.2.0", + "gix-utils", "thiserror 2.0.12", ] @@ -2457,97 +2223,75 @@ version = "0.0.0" [[package]] name = "gix-ref" -version = "0.44.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3394a2997e5bc6b22ebc1e1a87b41eeefbcfcff3dbfa7c4bd73cb0ac8f1f3e2e" -dependencies = [ - "gix-actor 0.31.5", - "gix-date 0.8.7", - "gix-features 0.38.2", - "gix-fs 0.11.3", - "gix-hash 0.14.2", - "gix-lock 14.0.0", - "gix-object 0.42.3", - "gix-path 0.10.14", - "gix-tempfile 14.0.2", - "gix-utils 0.1.14", - "gix-validate 0.8.5", - "memmap2", - "thiserror 1.0.69", - "winnow 0.6.26", -] - -[[package]] -name = "gix-ref" -version = "0.51.0" +version = "0.52.1" dependencies = [ "document-features", - "gix-actor 0.34.0", - "gix-date 0.9.4", - "gix-features 0.41.0", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-lock 17.0.0", - "gix-object 0.48.0", - "gix-path 0.10.15", - "gix-tempfile 17.0.0", + "gix-actor", + "gix-date", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-path", + "gix-tempfile", "gix-testtools", - "gix-utils 0.2.0", - "gix-validate 0.9.4", + "gix-utils", + "gix-validate", "memmap2", "serde", "thiserror 2.0.12", - "winnow 0.7.4", + "winnow", ] [[package]] name = "gix-ref-tests" version = "0.0.0" dependencies = [ - "gix-actor 0.34.0", - "gix-date 0.9.4", - "gix-discover 0.39.0", - "gix-features 0.41.0", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-lock 17.0.0", - "gix-object 0.48.0", + "gix-actor", + "gix-date", + "gix-discover", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", "gix-odb", - "gix-ref 0.51.0", + "gix-ref", "gix-testtools", - "gix-validate 0.9.4", + "gix-validate", "insta", ] [[package]] name = "gix-refspec" -version = "0.29.0" +version = "0.30.1" dependencies = [ "bstr", - "gix-hash 0.17.0", + "gix-hash", "gix-revision", "gix-testtools", - "gix-validate 0.9.4", + "gix-validate", "smallvec", "thiserror 2.0.12", ] [[package]] name = "gix-revision" -version = "0.33.0" +version = "0.34.1" dependencies = [ "bitflags 2.9.0", "bstr", "document-features", - "gix-commitgraph 0.27.0", - "gix-date 0.9.4", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-object 0.48.0", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", "gix-odb", - "gix-revwalk 0.19.0", + "gix-revwalk", "gix-testtools", - "gix-trace 0.1.12", + "gix-trace", "permutohedron", "serde", "thiserror 2.0.12", @@ -2555,28 +2299,13 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b030ccaab71af141f537e0225f19b9e74f25fefdba0372246b844491cab43e0" +version = "0.20.1" dependencies = [ - "gix-commitgraph 0.24.3", - "gix-date 0.8.7", - "gix-hash 0.14.2", - "gix-hashtable 0.5.2", - "gix-object 0.42.3", - "smallvec", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-revwalk" -version = "0.19.0" -dependencies = [ - "gix-commitgraph 0.27.0", - "gix-date 0.9.4", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-object 0.48.0", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", "gix-testtools", "smallvec", "thiserror 2.0.12", @@ -2584,27 +2313,15 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.10.11" +version = "0.11.0" dependencies = [ "bitflags 2.9.0", "document-features", - "gix-path 0.10.15", + "gix-path", "libc", "serde", "tempfile", - "windows-sys 0.52.0", -] - -[[package]] -name = "gix-sec" -version = "0.10.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84dae13271f4313f8d60a166bf27e54c968c7c33e2ffd31c48cafe5da649875" -dependencies = [ - "bitflags 2.9.0", - "gix-path 0.10.14", - "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2613,33 +2330,33 @@ version = "0.0.0" [[package]] name = "gix-shallow" -version = "0.3.0" +version = "0.4.0" dependencies = [ "bstr", - "gix-hash 0.17.0", - "gix-lock 17.0.0", + "gix-hash", + "gix-lock", "serde", "thiserror 2.0.12", ] [[package]] name = "gix-status" -version = "0.18.0" +version = "0.19.1" dependencies = [ "bstr", "document-features", "filetime", "gix-diff", "gix-dir", - "gix-features 0.41.0", + "gix-features", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", - "gix-path 0.10.15", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", "gix-pathspec", - "gix-worktree 0.40.0", + "gix-worktree", "portable-atomic", "thiserror 2.0.12", ] @@ -2652,29 +2369,29 @@ dependencies = [ "filetime", "gix-diff", "gix-dir", - "gix-features 0.41.0", + "gix-features", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", "gix-odb", - "gix-path 0.10.15", + "gix-path", "gix-pathspec", "gix-status", "gix-testtools", - "gix-worktree 0.40.0", + "gix-worktree", "pretty_assertions", ] [[package]] name = "gix-submodule" -version = "0.18.0" +version = "0.19.1" dependencies = [ "bstr", "gix-config", - "gix-features 0.41.0", - "gix-path 0.10.15", + "gix-features", + "gix-path", "gix-pathspec", "gix-refspec", "gix-testtools", @@ -2684,26 +2401,11 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "14.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046b4927969fa816a150a0cda2e62c80016fe11fb3c3184e4dddf4e542f108aa" -dependencies = [ - "gix-fs 0.11.3", - "libc", - "once_cell", - "parking_lot", - "signal-hook", - "signal-hook-registry", - "tempfile", -] - -[[package]] -name = "gix-tempfile" -version = "17.0.0" +version = "17.1.0" dependencies = [ "dashmap", "document-features", - "gix-fs 0.14.0", + "gix-fs", "libc", "once_cell", "parking_lot", @@ -2714,18 +2416,18 @@ dependencies = [ [[package]] name = "gix-testtools" -version = "0.16.0" +version = "0.16.1" dependencies = [ "bstr", "crc", "document-features", "fastrand", "fs_extra", - "gix-discover 0.32.0", - "gix-fs 0.11.3", - "gix-lock 14.0.0", - "gix-tempfile 14.0.2", - "gix-worktree 0.34.1", + "gix-discover", + "gix-fs", + "gix-lock", + "gix-tempfile", + "gix-worktree", "io-close", "is_ci", "once_cell", @@ -2733,7 +2435,7 @@ dependencies = [ "serial_test", "tar", "tempfile", - "winnow 0.7.4", + "winnow", "xz2", ] @@ -2749,15 +2451,9 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "gix-trace" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7" - [[package]] name = "gix-transport" -version = "0.46.0" +version = "0.47.0" dependencies = [ "async-std", "async-trait", @@ -2770,12 +2466,12 @@ dependencies = [ "futures-lite", "gix-command", "gix-credentials", - "gix-features 0.41.0", - "gix-hash 0.17.0", + "gix-features", + "gix-hash", "gix-pack", "gix-packetline", - "gix-quote 0.5.0", - "gix-sec 0.10.11", + "gix-quote", + "gix-sec", "gix-url", "maybe-async", "pin-project-lite", @@ -2786,32 +2482,15 @@ dependencies = [ [[package]] name = "gix-traverse" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e499a18c511e71cf4a20413b743b9f5bcf64b3d9e81e9c3c6cd399eae55a8840" -dependencies = [ - "bitflags 2.9.0", - "gix-commitgraph 0.24.3", - "gix-date 0.8.7", - "gix-hash 0.14.2", - "gix-hashtable 0.5.2", - "gix-object 0.42.3", - "gix-revwalk 0.13.2", - "smallvec", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-traverse" -version = "0.45.0" +version = "0.46.2" dependencies = [ "bitflags 2.9.0", - "gix-commitgraph 0.27.0", - "gix-date 0.9.4", - "gix-hash 0.17.0", - "gix-hashtable 0.8.0", - "gix-object 0.48.0", - "gix-revwalk 0.19.0", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", "smallvec", "thiserror 2.0.12", ] @@ -2820,12 +2499,12 @@ dependencies = [ name = "gix-traverse-tests" version = "0.0.0" dependencies = [ - "gix-commitgraph 0.27.0", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-commitgraph", + "gix-hash", + "gix-object", "gix-odb", "gix-testtools", - "gix-traverse 0.45.0", + "gix-traverse", "insta", ] @@ -2835,13 +2514,13 @@ version = "0.0.0" [[package]] name = "gix-url" -version = "0.30.0" +version = "0.31.0" dependencies = [ "assert_matches", "bstr", "document-features", - "gix-features 0.41.0", - "gix-path 0.10.15", + "gix-features", + "gix-path", "gix-testtools", "percent-encoding", "serde", @@ -2851,17 +2530,7 @@ dependencies = [ [[package]] name = "gix-utils" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f24e03ac8916c478c8419d7d3c33393da9bb41fa4c24455d5406aeefd35f" -dependencies = [ - "fastrand", - "unicode-normalization", -] - -[[package]] -name = "gix-utils" -version = "0.2.0" +version = "0.3.0" dependencies = [ "bstr", "fastrand", @@ -2870,17 +2539,7 @@ dependencies = [ [[package]] name = "gix-validate" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c27dd34a49b1addf193c92070bcbf3beaf6e10f16a78544de6372e146a0acf" -dependencies = [ - "bstr", - "thiserror 1.0.69", -] - -[[package]] -name = "gix-validate" -version = "0.9.4" +version = "0.10.0" dependencies = [ "bstr", "gix-testtools", @@ -2889,56 +2548,37 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f7326ebe0b9172220694ea69d344c536009a9b98fb0f9de092c440f3efe7a6" -dependencies = [ - "bstr", - "gix-attributes 0.22.5", - "gix-features 0.38.2", - "gix-fs 0.11.3", - "gix-glob 0.16.5", - "gix-hash 0.14.2", - "gix-ignore 0.11.4", - "gix-index 0.33.1", - "gix-object 0.42.3", - "gix-path 0.10.14", - "gix-validate 0.8.5", -] - -[[package]] -name = "gix-worktree" -version = "0.40.0" +version = "0.41.0" dependencies = [ "bstr", "document-features", - "gix-attributes 0.25.0", - "gix-features 0.41.0", - "gix-fs 0.14.0", - "gix-glob 0.19.0", - "gix-hash 0.17.0", - "gix-ignore 0.14.0", - "gix-index 0.39.0", - "gix-object 0.48.0", - "gix-path 0.10.15", - "gix-validate 0.9.4", + "gix-attributes", + "gix-features", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", + "gix-validate", "serde", ] [[package]] name = "gix-worktree-state" -version = "0.18.0" +version = "0.19.0" dependencies = [ "bstr", - "gix-features 0.41.0", + "gix-features", "gix-filter", - "gix-fs 0.14.0", - "gix-glob 0.19.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", - "gix-path 0.10.15", - "gix-worktree 0.40.0", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", + "gix-worktree", "io-close", "thiserror 2.0.12", ] @@ -2947,13 +2587,13 @@ dependencies = [ name = "gix-worktree-state-tests" version = "0.0.0" dependencies = [ - "gix-discover 0.39.0", - "gix-features 0.41.0", + "gix-discover", + "gix-features", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-fs", + "gix-hash", + "gix-index", + "gix-object", "gix-odb", "gix-testtools", "gix-worktree-state", @@ -2964,19 +2604,19 @@ dependencies = [ [[package]] name = "gix-worktree-stream" -version = "0.20.0" +version = "0.21.1" dependencies = [ - "gix-attributes 0.25.0", - "gix-features 0.41.0", + "gix-attributes", + "gix-features", "gix-filter", - "gix-fs 0.14.0", - "gix-hash 0.17.0", - "gix-object 0.48.0", + "gix-fs", + "gix-hash", + "gix-object", "gix-odb", - "gix-path 0.10.15", + "gix-path", "gix-testtools", - "gix-traverse 0.45.0", - "gix-worktree 0.40.0", + "gix-traverse", + "gix-worktree", "parking_lot", "thiserror 2.0.12", ] @@ -2986,19 +2626,19 @@ name = "gix-worktree-tests" version = "0.0.0" dependencies = [ "bstr", - "gix-attributes 0.25.0", - "gix-discover 0.39.0", - "gix-features 0.41.0", - "gix-fs 0.14.0", - "gix-glob 0.19.0", - "gix-hash 0.17.0", - "gix-ignore 0.14.0", - "gix-index 0.39.0", - "gix-object 0.48.0", + "gix-attributes", + "gix-discover", + "gix-features", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-ignore", + "gix-index", + "gix-object", "gix-odb", - "gix-path 0.10.15", + "gix-path", "gix-testtools", - "gix-worktree 0.40.0", + "gix-worktree", "symlink", ] @@ -3022,9 +2662,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" dependencies = [ "atomic-waker", "bytes", @@ -3041,14 +2681,23 @@ dependencies = [ [[package]] name = "half" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if", "crunchy", ] +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -3072,11 +2721,21 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", ] [[package]] @@ -3152,12 +2811,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c3b1f728c459d27b12448862017b96ad4767b1ec2ec5e6434e99f1577f085b8" -[[package]] -name = "humantime" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" - [[package]] name = "hyper" version = "1.6.0" @@ -3214,9 +2867,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" dependencies = [ "bytes", "futures-channel", @@ -3224,6 +2877,7 @@ dependencies = [ "http", "http-body", "hyper", + "libc", "pin-project-lite", "socket2", "tokio", @@ -3272,9 +2926,9 @@ dependencies = [ [[package]] name = "icu_locid_transform_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" [[package]] name = "icu_normalizer" @@ -3296,9 +2950,9 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" [[package]] name = "icu_properties" @@ -3317,9 +2971,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" [[package]] name = "icu_provider" @@ -3346,7 +3000,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -3381,9 +3035,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -3391,14 +3045,12 @@ dependencies = [ [[package]] name = "insta" -version = "1.42.2" +version = "1.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50259abbaa67d11d2bcafc7ba1d094ed7a0c70e3ce893f0d0997f73558cb3084" +checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371" dependencies = [ "console", - "linked-hash-map", "once_cell", - "pin-project", "similar", ] @@ -3506,9 +3158,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jiff" -version = "0.2.4" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d699bc6dfc879fb1bf9bdff0d4c56f0884fc6f0d0eb0fba397a6d00cd9a6b85e" +checksum = "d07d8d955d798e7a4d6f9c58cd1f1916e790b42b092758a9ef6e16fef9f1b3fd" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -3521,26 +3173,26 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.4" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d16e75759ee0aa64c57a56acbf43916987b20c77373cb7e808979e02b93c9f9" +checksum = "f244cfe006d98d26f859c7abd1318d85327e1882dc9cef80f62daeeb0adcf300" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "jiff-tzdb" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e1dfe9b2d75a84536cf5bf5eaaa4319aa7906c7160134a22883ac316d5f31" +checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524" [[package]] name = "jiff-tzdb-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a63c62e404e7b92979d2792352d885a7f8f83fd1d0d31eea582d77b2ceca697e" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" dependencies = [ "jiff-tzdb", ] @@ -3567,10 +3219,11 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.2", "libc", ] @@ -3624,9 +3277,9 @@ dependencies = [ [[package]] name = "layout-rs" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84deb28a3a6c839ca42a7341664f32281416d69e2f29deb85aec5cc0243fdea8" +checksum = "5b8b38bc67665e362eb770c6b6ae88b48d040d94a0a10c4904c37bc79d263b95" [[package]] name = "lazy_static" @@ -3642,9 +3295,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" @@ -3669,30 +3322,20 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.30.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +checksum = "947e6816f7825b2b45027c2c32e7085da9934defa535de4a6a46b10a4d5257fa" dependencies = [ "cc", "pkg-config", "vcpkg", ] -[[package]] -name = "libz-ng-sys" -version = "1.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7118c2c2a3c7b6edc279a8b19507672b9c4d716f95e671172dfa4e23f9fd824" -dependencies = [ - "cmake", - "libc", -] - [[package]] name = "libz-rs-sys" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902bc563b5d65ad9bba616b490842ef0651066a1a1dc3ce1087113ffcb873c8d" +checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a" dependencies = [ "zlib-rs", ] @@ -3704,18 +3347,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" dependencies = [ "cc", - "cmake", "libc", "pkg-config", "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -3750,17 +3386,11 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "lockfree-object-pool" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" - [[package]] name = "log" -version = "0.4.26" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" dependencies = [ "value-bag", ] @@ -3799,7 +3429,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -3840,9 +3470,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", ] @@ -3939,12 +3569,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-integer" version = "0.1.46" @@ -3964,12 +3588,12 @@ dependencies = [ ] [[package]] -name = "num_threads" -version = "0.1.7" +name = "objc2-core-foundation" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "libc", + "bitflags 2.9.0", ] [[package]] @@ -3983,9 +3607,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.1" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "oorandom" @@ -4006,9 +3630,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ "bitflags 2.9.0", "cfg-if", @@ -4027,7 +3651,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4038,9 +3662,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" dependencies = [ "cc", "libc", @@ -4107,26 +3731,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b687ff7b5da449d39e418ad391e5e08da53ec334903ddbb921db208908fc372c" -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -4214,12 +3818,6 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -4241,34 +3839,28 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" dependencies = [ "proc-macro2", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "prodash" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744a264d26b88a6a7e37cbad97953fa233b94d585236310bcbc88474b4092d79" - -[[package]] -name = "prodash" -version = "29.0.1" +version = "29.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee7ce24c980b976607e2d6ae4aae92827994d23fed71659c3ede3f92528b58b" +checksum = "f04bb108f648884c23b98a0e940ebc2c93c0c3b89f04dbaf7eb8256ce617d1bc" dependencies = [ "async-io", "bytesize", @@ -4318,9 +3910,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" dependencies = [ "bytes", "getrandom 0.3.2", @@ -4338,9 +3930,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.10" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" +checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" dependencies = [ "cfg_aliases", "libc", @@ -4367,13 +3959,12 @@ checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" [[package]] name = "rand" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha", "rand_core", - "zerocopy 0.8.23", ] [[package]] @@ -4437,9 +4028,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" dependencies = [ "bitflags 2.9.0", ] @@ -4539,9 +4130,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.32.1" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" +checksum = "a22715a5d6deef63c637207afbe68d0c72c3f8d0022d7cf9714c442d6157606b" dependencies = [ "bitflags 2.9.0", "fallible-iterator", @@ -4584,9 +4175,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.3" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ "bitflags 2.9.0", "errno", @@ -4597,9 +4188,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" dependencies = [ "aws-lc-rs", "once_cell", @@ -4730,9 +4321,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea091f6cac2595aa38993f04f4ee692ed43757035c36e67c180b6828356385b1" +checksum = "22b2d775fb28f245817589471dd49c5edf64237f4a19d10ce9a92ff4651a27f4" dependencies = [ "sdd", ] @@ -4799,7 +4390,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4857,7 +4448,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4881,12 +4472,6 @@ dependencies = [ "sha1", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - [[package]] name = "sharded-slab" version = "0.1.7" @@ -4931,9 +4516,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -4961,18 +4546,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" dependencies = [ "serde", ] [[package]] name = "socket2" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" dependencies = [ "libc", "windows-sys 0.52.0", @@ -4985,7 +4570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5025,7 +4610,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5053,9 +4638,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -5073,25 +4658,25 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "sysinfo" -version = "0.31.4" +version = "0.34.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be" +checksum = "a4b93974b3d3aeaa036504b8eefd4c039dced109171c1ae973f1dc63b2c7e4b2" dependencies = [ - "core-foundation-sys", "libc", "memchr", "ntapi", + "objc2-core-foundation", "windows 0.57.0", ] @@ -5135,14 +4720,14 @@ checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790" [[package]] name = "tempfile" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", - "rustix 1.0.3", + "rustix 1.0.7", "windows-sys 0.59.0", ] @@ -5157,12 +4742,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ - "rustix 0.38.44", - "windows-sys 0.48.0", + "rustix 1.0.7", + "windows-sys 0.59.0", ] [[package]] @@ -5197,7 +4782,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5208,7 +4793,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5221,39 +4806,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.3.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" -dependencies = [ - "deranged", - "itoa", - "libc", - "num-conv", - "num_threads", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" - -[[package]] -name = "time-macros" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" -dependencies = [ - "num-conv", - "time-core", -] - [[package]] name = "tinystr" version = "0.7.6" @@ -5291,9 +4843,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.1" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", @@ -5326,9 +4878,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes", "futures-core", @@ -5339,9 +4891,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", "serde_spanned", @@ -5351,26 +4903,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.4", + "toml_write", + "winnow", ] +[[package]] +name = "toml_write" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" + [[package]] name = "tower" version = "0.5.2" @@ -5417,7 +4976,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5603,9 +5162,9 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "value-bag" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" [[package]] name = "vcpkg" @@ -5675,7 +5234,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -5710,7 +5269,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5746,9 +5305,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.8" +version = "0.26.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" +checksum = "37493cadf42a2a939ed404698ded7fb378bf301b5011f973361779a3a74f8c93" dependencies = [ "rustls-pki-types", ] @@ -5817,12 +5376,24 @@ dependencies = [ [[package]] name = "windows" -version = "0.58.0" +version = "0.61.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-collections", + "windows-core 0.61.0", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.0", ] [[package]] @@ -5839,15 +5410,25 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.58.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-implement 0.60.0", + "windows-interface 0.59.1", + "windows-link", + "windows-result 0.3.2", + "windows-strings 0.4.0", +] + +[[package]] +name = "windows-future" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32" +dependencies = [ + "windows-core 0.61.0", + "windows-link", ] [[package]] @@ -5858,18 +5439,18 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "windows-implement" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5880,18 +5461,18 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "windows-interface" -version = "0.58.0" +version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5900,6 +5481,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.0", + "windows-link", +] + [[package]] name = "windows-registry" version = "0.4.0" @@ -5920,15 +5511,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.3.2" @@ -5940,19 +5522,18 @@ dependencies = [ [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" dependencies = [ "windows-link", ] @@ -6228,30 +5809,21 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.6.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.52.0" +version = "0.55.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -6282,7 +5854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" dependencies = [ "libc", - "rustix 1.0.3", + "rustix 1.0.7", ] [[package]] @@ -6320,7 +5892,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "synstructure", ] @@ -6350,7 +5922,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -6361,7 +5933,7 @@ checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -6381,7 +5953,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "synstructure", ] @@ -6410,42 +5982,38 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "zip" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" dependencies = [ "arbitrary", "crc32fast", "crossbeam-utils", - "displaydoc", "flate2", "indexmap", "memchr", - "thiserror 2.0.12", "zopfli", ] [[package]] name = "zlib-rs" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b20717f0917c908dc63de2e44e97f1e6b126ca58d0e391cee86d504eb8fbd05" +checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8" [[package]] name = "zopfli" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +checksum = "edfc5ee405f504cd4984ecc6f14d02d55cfda60fa4b689434ef4102aae150cd7" dependencies = [ "bumpalo", "crc32fast", - "lockfree-object-pool", "log", - "once_cell", "simd-adler32", ] diff --git a/Cargo.toml b/Cargo.toml index 384db8e423c..559c4367fe2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/GitoxideLabs/gitoxide" authors = ["Sebastian Thiel "] edition = "2021" license = "MIT OR Apache-2.0" -version = "0.42.0" +version = "0.44.0" rust-version = "1.74" default-run = "gix" include = ["src/**/*", "/build.rs", "LICENSE-*", "README.md"] @@ -41,14 +41,15 @@ max = ["max-control", "fast", "gitoxide-core-tools-query", "gitoxide-core-tools- ## Like `max`, but only Rust is allowed. ## -## This is the most compatible build as it won't need a C compiler or C toolchains to build. It's also not the fastest as or the most feature-rich in terms of available -## transports as it uses Rust's HTTP implementation. +## This is the most compatible build as it won't need a C compiler or C toolchains to build. Thanks to zlib-rs, you don't have to trade off between compatibility and performance. +## +## This uses Rust's HTTP implementation. ## ## As fast as possible, with TUI progress, progress line rendering with auto-configuration, all transports available but less mature pure Rust HTTP implementation, all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs. -max-pure = ["max-control", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client"] +max-pure = ["max-control", "http-client-reqwest", "gitoxide-core-blocking-client"] ## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information. -max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex"] +max-control = ["tracing", "fast", "pretty-cli", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex"] ## All the good stuff, with less fanciness for smaller binaries. ## @@ -60,7 +61,7 @@ lean = ["fast", "tracing", "pretty-cli", "http-client-curl", "gitoxide-core-tool ## This build is essentially limited to local operations without any fanciness. ## ## Optimized for size, no parallelism thus much slower, progress line rendering. -small = ["pretty-cli", "gix-features/zlib-rust-backend", "prodash-render-line", "is-terminal"] +small = ["pretty-cli", "prodash-render-line", "is-terminal"] ## Like lean, but uses Rusts async implementations for networking. ## @@ -74,37 +75,20 @@ small = ["pretty-cli", "gix-features/zlib-rust-backend", "prodash-render-line", lean-async = ["fast", "tracing", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-async-client", "prodash-render-line"] #! ### Package Maintainers -#! `*-control` features leave it to you to configure C libraries, involving choices for `zlib` and transport implementation. +#! `*-control` features leave it to you to configure C libraries, involving choices for HTTP transport implementation. #! #! Additional features *can* be provided with `--features` and are handled by the [`gix-features` crate](https://docs.rs/gix-features/latest). -#! If nothing else is specified, the Rust implementation is used. ! Note that only one feature of each section can be enabled at a time. -#! -#! * **zlib** -#! - `gix-features/zlib-ng` -#! - `gix-features/zlib-ng-compat` -#! - `gix-features/zlib-stock` -#! - `gix-features/zlib-rust-backend` (*default if no choice is made*) -#! * **HTTP** - see the *Building Blocks for mutually exclusive networking* headline -#! -#! #### Examples -#! -#! * `cargo build --release --no-default-features --features max-control,gix-features/zlib-stock,gitoxide-core-blocking-client,http-client-curl` -#! - Create a build just like `max`, but using the stock `zlib` library instead of `zlib-ng` -#! * `cargo build --release --no-default-features --features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/zlib-ng` -#! - Create a build just like `max-pure`, but with faster compression due to `zlib-ng`. +#! Note that only one HTTP transport can be enabled at a time. See the *Building Blocks for mutually exclusive networking* headline. #! ### Building Blocks #! Typical combinations of features of our dependencies, some of which are referred to in the `gitoxide` crate's code for conditional compilation. -## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions -## as well as a faster zlib backend. +## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions. ## If disabled, the binary will be visibly smaller. fast = ["gix/max-performance", "gix/comfort"] -## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions -## as well as a faster zlib backend. -## If disabled, the binary will be visibly smaller. -fast-safe = ["gix/max-performance-safe", "gix/comfort"] +## Deprecated: identical to `fast`, as the fastest zlib backend is now the pure-Rust zlib-rs. +fast-safe = ["fast"] ## Enable tracing in `gitoxide-core`. tracing = ["dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing", "gix-features/tracing", "gix-features/tracing-detail"] @@ -165,17 +149,17 @@ http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"] gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"] [dependencies] -anyhow = "1.0.42" +anyhow = "1.0.98" -gitoxide-core = { version = "^0.46.0", path = "gitoxide-core" } -gix-features = { version = "^0.41.0", path = "gix-features" } -gix = { version = "^0.71.0", path = "gix", default-features = false } +gitoxide-core = { version = "^0.47.1", path = "gitoxide-core" } +gix-features = { version = "^0.42.1", path = "gix-features" } +gix = { version = "^0.72.1", path = "gix", default-features = false } -clap = { version = "4.1.1", features = ["derive", "cargo"] } -clap_complete = "4.4.3" -prodash = { version = "29.0.1", optional = true } +clap = { version = "4.5.37", features = ["derive", "cargo"] } +clap_complete = "4.5.48" +prodash = { version = "29.0.2", optional = true } is-terminal = { version = "0.4.0", optional = true } -env_logger = { version = "0.10.0", default-features = false } +env_logger = { version = "0.11.8", default-features = false } crosstermion = { version = "0.14.0", optional = true, default-features = false } futures-lite = { version = "2.1.0", optional = true } @@ -185,12 +169,12 @@ tracing-subscriber = { version = "0.3.17", optional = true } tracing = { version = "0.1.37", optional = true } # for config-tree -terminal_size = "0.3.0" +terminal_size = "0.4.2" # Avoid pre-compiled binaries, see https://github.com/serde-rs/serde/issues/2538 and https://github.com/serde-rs/serde/pull/2590 serde_derive = ">=1.0.185" -once_cell = "1.18.0" +once_cell = "1.21.3" document-features = { version = "0.2.0", optional = true } [profile.dev.package] insta.opt-level = 3 @@ -201,8 +185,8 @@ gix-ref = { opt-level = 3 } gix-hash = { opt-level = 3 } gix-actor = { opt-level = 3 } gix-config = { opt-level = 3 } -miniz_oxide = { opt-level = 3 } sha1-checked = { opt-level = 3 } +zlib-rs = { opt-level = 3 } [profile.release] overflow-checks = false @@ -393,3 +377,7 @@ no_effect_underscore_binding = "allow" # x1 empty_docs = "allow" too_long_first_doc_paragraph = "allow" large_stack_arrays = "allow" + +# Fix one day +result_large_err = "allow" +large_enum_variant = "allow" diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 016b1bc2e61..f433b1a53f5 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -175,15 +175,3 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Makefile b/Makefile index fea4c7229ec..431c041979d 100644 --- a/Makefile +++ b/Makefile @@ -126,8 +126,8 @@ bench-gix-config: check-msrv-on-ci: ## Check the minimal support rust version for currently installed Rust version rustc --version - cargo check --package gix - cargo check --package gix --no-default-features --features async-network-client,max-performance + cargo build --locked --package gix + cargo build --locked --package gix --no-default-features --features async-network-client,max-performance ##@ Maintenance diff --git a/README.md b/README.md index ca293fdb0fc..aa26ba83926 100644 --- a/README.md +++ b/README.md @@ -177,17 +177,19 @@ on your needs, for _Linux_, _MacOS_ and _Windows_. [releases]: https://github.com/GitoxideLabs/gitoxide/releases -### Download from Arch-Repository +### Download from Arch Linux repository For Arch Linux you can download `gitoxide` from `community` repository: -``` + +```sh pacman -S gitoxide ``` ### Download from Exherbo Linux Rust repository For Exherbo Linux you can download `gitoxide` from the [Rust](https://gitlab.exherbo.org/exherbo/rust/-/tree/master/packages/dev-scm/gitoxide) repository: -``` + +```sh cave resolve -x repository/rust cave resolve -x gitoxide ``` @@ -203,7 +205,7 @@ the latest stable one will work as well. There are various build configurations, all of them are [documented here](https://docs.rs/crate/gitoxide/latest). The documentation should also be useful for packagers who need to tune external dependencies. -``` +```sh # A way to install `gitoxide` with just Rust and a C compiler installed. # If there are problems with SSL certificates during clones, try to omit `--locked`. cargo install gitoxide --locked --no-default-features --features max-pure @@ -220,19 +222,25 @@ cargo install gitoxide --locked --no-default-features --features lean The following installs the latest unpublished `max` release directly from git: ```sh -cargo install --git https://github.com/GitoxideLabs/gitoxide gitoxide +cargo install --git https://github.com/GitoxideLabs/gitoxide gitoxide ``` #### How to deal with build failures -On some platforms, installation may fail due to lack of tools required by `C` toolchains. This can generally be avoided by installation -with `cargo install gitoxide --no-default-features --features max-pure`. +On some platforms, installation may fail due to lack of tools required by *C* toolchains. This can generally be avoided by installation with: + +```sh +cargo install gitoxide --no-default-features --features max-pure +``` What follows is a list of known failures. -- On Fedora, `perl` needs to be installed for `OpenSSL` to build properly. This can be done with the following command: - `dnf install perl` (see [this issue](https://github.com/GitoxideLabs/gitoxide/issues/592)). -- +- On Fedora, `perl` needs to be installed for `OpenSSL` to build properly. This can be done with the following command (see [issue #592](https://github.com/GitoxideLabs/gitoxide/issues/592)): + + ```sh + dnf install perl + ``` + ### Using Docker Some CI/CD pipelines leverage repository cloning. Below is a copy-paste-able example to build docker images for such workflows. @@ -418,8 +426,8 @@ Please take a look at the [`SHORTCOMINGS.md` file](https://github.com/GitoxideLa * **itertools** _(MIT Licensed)_ * We use the `izip!` macro in code -* **deflate2** _(MIT Licensed)_ - * We use various abstractions to implement decompression and compression directly on top of the rather low-level `miniz_oxide` crate +* **flate2** _(MIT Licensed)_ + * We use the high-level `flate2` library to implement decompression and compression, which builds on the high-performance `zlib-rs` crate. ## 🙏 Special Thanks 🙏 diff --git a/SHORTCOMINGS.md b/SHORTCOMINGS.md index 3bdf20aa43d..56d1f9c23fa 100644 --- a/SHORTCOMINGS.md +++ b/SHORTCOMINGS.md @@ -1,37 +1,39 @@ -This file is for tracking features that are less well implemented or less powerful than their `git` counterparts for one reason or another. +# Shortcomings -#### `gix` +This file is for tracking features that are less well implemented or less powerful than their Git counterparts for one reason or another. ### gix-index -* The `link` extension can be read, but won't be written. This effectively disables the use of a split index once a mutating operation is run on it with `gitixode`. +* The `link` extension can be read, but won't be written. This effectively disables the use of a split index once a mutating operation is run on it with `gitoxide`. ### gix-protocol -* **fetches using protocol V1 and stateful connections, i.e. ssh, git, file, may hang** + +* **Fetches using protocol V1 and stateful connections, i.e. ssh, git, file, may hang** * This can be fixed by making response parsing. * Note that this does not affect cloning, which works fine. -### `gix-pack` +### gix-pack + * **Packfiles use memory maps** * Even though they are comfortable to use and fast, they squelch IO errors. - * _potential remedy_: We could generalize the Pack to make it possible to work on in-memory buffers directly. That way, one - would initialize a Pack by reading the whole file into memory, thus not squelching IO errors at the expense of latency as well + * _Potential remedy_: We could generalize the `Pack` to make it possible to work on in-memory buffers directly. That way, one + would initialize a `Pack` by reading the whole file into memory, thus not squelching IO errors at the expense of latency as well as memory efficiency. -* **Packfiles cannot load files bigger than 2^31 or 2^32 on 32 bit systems** +* **Packfiles cannot load files bigger than 2^31 or 2^32 on 32-bit systems** * As these systems cannot address more memory than that. - * _potential remedy_: implement a sliding window to map and unmap portions of the file as needed. - * However, those who need to access big packs on these systems would rather resort to `git` itself, allowing + * _Potential remedy_: implement a sliding window to map and unmap portions of the file as needed. + * However, those who need to access big packs on these systems would rather resort to Git itself, allowing our implementation to be simpler and potentially more performant. -* **Objects larger than 32 bits cannot be loaded on 32 bit systems** - * in-memory representations objects cannot handle objects greater than the amount of addressable memory. - * This will not affect git LFS though. +* **Objects larger than 32 bits cannot be loaded on 32-bit systems** + * In-memory representations objects cannot handle objects greater than the amount of addressable memory. + * This will not affect Git LFS though. -### `gix` +### gix -* object replacements are read once upon opening the repository from their refs and changes to these won't be picked up. +* Object replacements are read once upon opening the repository from their refs and changes to these won't be picked up. -### `gix-url` +### gix-url -* **gix-url** _might_ be more restrictive than what git allows as for the most part, it uses a browser grade URL parser. - * Thus far there is no proof for this, and as _potential remedy_ we could certainly re-implement exactly what git does +* **gix-url** _might_ be more restrictive than what Git allows as for the most part, it uses a browser grade URL parser. + * Thus far there is no proof for this, and as _potential remedy_ we could certainly re-implement exactly what Git does to handle its URLs. diff --git a/STABILITY.md b/STABILITY.md index 613dfe63173..028a92f77db 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -14,7 +14,7 @@ Please note that this guide isn't stable itself and may be adjusted to fit chang - _workspace crate_ - A crate which is a member of this workspace and hence is stored in this repository - _breaking change_ - - A change in code that requires a `dependent crate` to adjust their code to fix compile errors. + - A change in code that requires a _dependent crate_ to adjust their code to fix compile errors. - _release_ - A new version of a crate is published to crates.io - _development version_ @@ -22,13 +22,14 @@ Please note that this guide isn't stable itself and may be adjusted to fit chang - _release version_ - A crate version whose _major_ version is 1 or higher. - _initial development phase_ (IDP) - - The phase of development leading up to producing a crate with a major version of 1 or greater, as per `semver`. + - The phase of development leading up to producing a crate with a major version of 1 or greater, as per [semver]. - Not to be confused with the term _pre-release_, which is used to indicate any release version prior to an actual release, like `1.1.0-beta.1`. ## Tiers The project uses three stability tiers for all of its crates, and all crates use [semver] for their version numbers. -Tiers differ primarily in the time between breaking changes, which always have to be announced with `PRs` as per + +Tiers differ primarily in the time between breaking changes, which always have to be announced with *PRs* as per our [collaboration guide]. The following schematic helps to visualize what follows. @@ -108,10 +109,10 @@ If there are additional breaking changes without a release, these push back the ### Tier 1: released apps and application crates Released apps and application crates are marked with major version number 1 or above, like `2.3.0+21.06` and live in tier 1 _(->ST1)_, -with the build identifiers for year (`21`) and month `06` appended, based on the actual release year and month. +with the build identifiers for year (`21`) and month (`06`) appended, based on the actual release year and month. Breaking changes are collected and may be released no more often than every 6 months by incrementing the major version number. If there are additional breaking changes, -these push bac the release date so that they can be tested at least for 3 months. For example, a breaking change happens in January 01, and another breaking change in February 15. +these push back the release date so that they can be tested at least for 3 months. For example, a breaking change happens in January 01, and another breaking change in February 15. The earliest release date is July 1st. Had the second breaking change happened in April 01, the release date would have to be pushed to August 1st. Intermediate pre-releases may be created at most every 4 weeks by appending `-alpha.X` where `X` is the sequential release number. These should help testing diff --git a/deny.toml b/deny.toml index a82e3b44407..6dbb3089723 100644 --- a/deny.toml +++ b/deny.toml @@ -9,8 +9,7 @@ # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html [advisories] ignore = [ - # `paste` - macro crate without replacement - "RUSTSEC-2024-0436" + { id = "RUSTSEC-2024-0436", reason = "`paste` - macro crate without replacement" }, ] @@ -26,10 +25,10 @@ allow = [ "Apache-2.0", "BSD-3-Clause", "BSL-1.0", + "CDLA-Permissive-2.0", "MIT", "MIT-0", "ISC", - "LicenseRef-ring", "OpenSSL", "Zlib", "MPL-2.0", @@ -52,12 +51,3 @@ deny = [ # end range due to https://github.com/serde-rs/serde/pull/2590 { name = "serde_derive", version = ">1.0.171, <1.0.185" }, ] - - -[[licenses.clarify]] -name = "ring" -expression = "LicenseRef-ring" -license-files = [ - { path = "LICENSE", hash = 0xbd0eed23 }, -] - diff --git a/etc/docker/Dockerfile.alpine b/etc/docker/Dockerfile.alpine index 0c29bccb162..dd0bcb718b9 100644 --- a/etc/docker/Dockerfile.alpine +++ b/etc/docker/Dockerfile.alpine @@ -4,15 +4,13 @@ ARG GITOXIDE_VERSION=0.36.0 FROM rust:alpine AS bootstrap_os # hadolint ignore=DL3018 RUN apk upgrade --update-cache --available \ - && apk add --no-cache --virtual .runtime-gitoxide libressl zlib-ng \ - libressl3.8-libcrypto + && apk add --no-cache --virtual .runtime-gitoxide libressl libressl3.8-libcrypto FROM bootstrap_os AS bootstrap_build_deps # hadolint ignore=DL3018 RUN apk add --no-cache --virtual .rust-builder cmake gcc musl-dev make pkgconfig \ - && apk add --no-cache --virtual .bootstrap-gitoxide libressl-dev zlib-ng \ - libressl3.8-libcrypto + && apk add --no-cache --virtual .bootstrap-gitoxide libressl-dev libressl3.8-libcrypto FROM bootstrap_build_deps AS bootstrap_builder diff --git a/etc/docker/Dockerfile.test-cross b/etc/docker/Dockerfile.test-cross new file mode 100644 index 00000000000..7d420c754d0 --- /dev/null +++ b/etc/docker/Dockerfile.test-cross @@ -0,0 +1,7 @@ +ARG TARGET +FROM ghcr.io/cross-rs/${TARGET}:latest + +ARG TARGET +COPY customize.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/customize.sh && \ + /usr/local/bin/customize.sh "$TARGET" diff --git a/etc/docker/test-cross-context/customize.sh b/etc/docker/test-cross-context/customize.sh new file mode 100755 index 00000000000..a7dd5a4f79b --- /dev/null +++ b/etc/docker/test-cross-context/customize.sh @@ -0,0 +1,133 @@ +#!/bin/bash +set -euxC + +target="$1" +test -n "$target" + +# Arrange for the indirect `tzdata` dependency to be installed and configured +# without prompting for the time zone. (Passing `-y` is not enough.) +export DEBIAN_FRONTEND=noninteractive TZ=UTC + +# Install tools for setting up APT repositores. Install `apt-utils` before the +# others, so the installation of `gnupg` can use it for debconf. +apt-get update +apt-get install --no-install-recommends -y apt-utils +apt-get install --no-install-recommends -y apt-transport-https dpkg-dev gnupg +type dpkg-architecture # Make sure we really have this. + +# Decide what architecture to use for `git`, shared libraries `git` links to, +# and shared libraries gitoxide links to when building `max`. Instead of this +# custom logic, we could use `$CROSS_DEB_ARCH`, which `cross` tries to provide +# (https://github.com/cross-rs/cross/blob/v0.2.5/src/lib.rs#L268), and which is +# available for roughly the same architectures where this logic gets a nonempty +# value. But using `$CROSS_DEB_ARCH` may make it harder to build and test the +# image manually. In particular, if it is not passed, we would conclude that we +# should install the versions of those packages with the host's architecture. +apt_suffix= +if target_arch="$(dpkg-architecture --host-type "$target" --query DEB_HOST_ARCH)" +then + dpkg --add-architecture "$target_arch" + apt_suffix=":$target_arch" + printf 'INFO: Using target architecture for `git` and libs in container.\n' + printf 'INFO: This architecture is %s.\n' "$target_arch" +else + apt_suffix='' + printf 'WARNING: Using HOST architecture for `git` and libs in container.\n' +fi + +# Get release codename. Like `lsb_release -sc`. (`lsb_release` may be absent.) +release="$(sed -n 's/^VERSION_CODENAME=//p' /etc/os-release)" + +# Add the git-core PPA manually. (Faster than installing `add-apt-repository`.) +echo "deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu $release main" \ + >/etc/apt/sources.list.d/git-core-ubuntu-ppa.list +apt-key adv --keyserver keyserver.ubuntu.com \ + --recv-keys F911AB184317630C59970973E363C90F8F1B6217 +apt-get update + +# Remove the old `git` and associated packages. +apt-get purge --autoremove -y git + +# Git dependencies. These are for the desired architecture, except `git-man` is +# the same package for all architectures, and we can't always install `perl` or +# `liberror-perl` for the desired architecture (at least in s390x). +# TODO(maint): Resolve these dynamically to support future `cross` base images. +git_deps=( + git-man + "libc6$apt_suffix" + "libcurl3-gnutls$apt_suffix" + "libexpat1$apt_suffix" + liberror-perl + "libpcre2-8-0$apt_suffix" + "zlib1g$apt_suffix" + perl +) + +# Other dependencies for running the gitoxide test suite and fixture scripts, +# and for building and testing gitoxide for feature sets beyond `max-pure`. +gix_test_deps=( + ca-certificates + cmake + "curl$apt_suffix" + jq + "libc-dev$apt_suffix" + "libssl-dev$apt_suffix" + patch + pkgconf +) + +if test -n "$apt_suffix"; then + # Install everything we need except `git` (and what we already have). We + # can't necessarily install `git` this way, because it insists on `perl` + # and `liberror-perl` dependencies of the same architecture as it. These + # may not be possible to install in a mixed environment, where most + # packages are a different architecture, and where `perl` is a dependency + # of other important packages. So we will install everything else first + # (then manually add `git`). + apt-get install --no-install-recommends -y \ + "${git_deps[@]}" "${gix_test_deps[@]}" file + + # Add `git` by manually downloading it and installing it with `dpkg`, + # forcing installation to proceed even if its `perl` and `liberror-perl` + # dependencies, as declared by `git`, are absent. (We have already + # installed them, but in a possibly different architecture. `git` can still + # use them, because its use is to run scripts, rather than to link to a + # shared library they provide.) It is preferred to let `apt-get download` + # drop privileges to the `_apt` user during download, so we download it + # inside `/tmp`. But we create a subdirectory so it is safe to make + # assumptions about what files globs can expand to, even if `/tmp` is + # mounted to an outside share temp dir on a multi-user system. + mkdir /tmp/dl # Don't use `-p`; if it exists already, we cannot trust it. + chown _apt /tmp/dl # Use owner, as the container may have no `_apt` group. + (cd /tmp/dl && apt-get download "git$apt_suffix") + dpkg --ignore-depends="perl$apt_suffix,liberror-perl$apt_suffix" \ + -i /tmp/dl/git[-_]*.deb + rm -r /tmp/dl +else + # Install everything we need, including `git`. + apt-get install --no-install-recommends -y git "${gix_test_deps[@]}" file +fi + +# Show information about the newly installed `git` (and ensure it can run). +git version --build-options +git="$(command -v git)" +file -- "$git" + +# Clean up files related to package management that we won't need anymore. +apt-get clean +rm -rf /var/lib/apt/lists/* + +# If this image has a runner script `cross` uses for Android, patch the script +# to add the ability to suppress its customization of `LD_PRELOAD`. The runner +# script sets `LD_PRELOAD` to the path of `libc++_shared.so` in the Android NDK +# (https://github.com/cross-rs/cross/blob/v0.2.5/docker/android-runner#L34). +# But this causes a problem for us. When a host-architecture program is run, +# `ld.so` shows a message about the "wrong ELF class". Such programs can still +# run, but when we rely on their specific output to stderr, fixtures and tests +# fail. The change we make here lets us set `NO_PRELOAD_CXX=1` to avoid that. +runner=/android-runner +patch='s/^[[:blank:]]*export LD_PRELOAD=/test "${NO_PRELOAD_CXX:-0}" != 0 || &/' +if test -f "$runner"; then sed -i.orig "$patch" -- "$runner"; fi + +# Ensure a nonempty Git `system` scope (for the `installation_config` tests). +git config --system gitoxide.imaginary.arbitraryVariable arbitraryValue diff --git a/etc/docker/test-cross.toml b/etc/docker/test-cross.toml new file mode 100644 index 00000000000..31c5e671b5b --- /dev/null +++ b/etc/docker/test-cross.toml @@ -0,0 +1,26 @@ +# `cross` configuration for running tests. Treated like `Cross.toml` if enabled +# with `CROSS_CONFIG=etc/docker/test-cross.toml`. This avoids affecting other +# `cross` usage, e.g. in `release.yml`. See `cross-test` recipes in `justfile`. + +[build.env] +passthrough = [ + "CI", + "GITHUB_ACTIONS", + "GIX_CREDENTIALS_HELPER_STDERR", + "GIX_EXTERNAL_COMMAND_STDERR", + "GIX_OBJECT_CACHE_MEMORY", + "GIX_PACK_CACHE_MEMORY", + "GIX_TEST_CREATE_ARCHIVES_EVEN_ON_CI", + "GIX_TEST_EXPECT_REDUCED_TRUST", + "GIX_TEST_IGNORE_ARCHIVES", + "GIX_VERSION", + "NO_PRELOAD_CXX", + "RUST_BACKTRACE", + "RUST_LIB_BACKTRACE", +] + +[target.armv7-linux-androideabi] +image = "cross-rs-gitoxide:armv7-linux-androideabi" + +[target.s390x-unknown-linux-gnu] +image = "cross-rs-gitoxide:s390x-unknown-linux-gnu" diff --git a/etc/msrv-badge.svg b/etc/msrv-badge.svg index 184a0688c61..3d42373fe68 100644 --- a/etc/msrv-badge.svg +++ b/etc/msrv-badge.svg @@ -1,4 +1,4 @@ - + rustc: 1.75.0+ diff --git a/etc/reports/25-04.md b/etc/reports/25-04.md new file mode 100644 index 00000000000..f28675465c4 --- /dev/null +++ b/etc/reports/25-04.md @@ -0,0 +1,47 @@ +While the previous month was full of bug reports, this month is full of fixes (fortunately). And there is more…. + +## SHA1 with collision detection + +Let's face it, `gitoxide` had it coming. Using the fastest possible SHA1 implementation was great while not too many people were using it, but with `jj` using it for Git interactions the requirements changed. + +It was quite a lot of [contributed work](https://github.com/GitoxideLabs/gitoxide/pull/1915), but now we are finally en-par with Git, which seems to also use a slow SHA1 implementation with collision detection. Unfortunately, this also removes a major performance advantage as it reduces the SHA1 hashing speed by a factor of roughly 3x, a slowdown most noticeable when cloning repositories. In numbers, on my machine I could previously get ~24.5GB/s hashing speed on, and now it's down to 8.5GB/s. + +On the bright side, this will definitely increase the motivation of supporting SHA256 sooner, which should hash with up to 2.1GB per core on my machine, nearly twice as fast as SHA1 prior to collision detection. + +Finally, let me share the [security advisory](https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2frx-2596-x5r6) that motivated the fix, which should help the downstream to upgrade to the latest release. + +## `zlib-rs` as the one and only + +With [zlib-rs](https://github.com/trifectatechfoundation/zlib-rs) we now have a pure-Rust implementation of `zlib-ng`, which for `gitoxide` turned out to be 1% faster than `zlib-ng`, the previously fastest C implementation. That number is an even greater achievement when realizing this is 1% of 3x longer time compared to the SHA1 implementation without collision detection. + +Thanks to [Josh Triplett](https://github.com/joshtriplett/) we could now deprecate all zlib-related configuration flags as a pure Rust implementation will never clash with C symbol exports. In a future step, the deprecated Cargo features will be removed for a great reduction in configuration complexity. + +## Improved `safe.directory` handling + +As `gitoxide` had the luxury of implementing Git from the ground up it could prepare for certain 'concepts' while Git had to tack them on. With that in mind, `safe.directory` wasn't all that important, to the point where it wasn't used where it should have been. + +For one, Git now supports `*` as wildcard-suffixes, allowing to set a directory prefix as safe, and with [this fix](https://github.com/GitoxideLabs/gitoxide/issues/1912) `gitoxide` will do the same. This will also affect Git configuration, which previously wasn't trusted as `safe.directory` didn't affect it. + +Additionally, and unfortunately only with manual testing, I now believe that the fixed implementation is similar to what Git does. + +## Welcome to the Family + +In an effort to unify the maintenance setup of various related projects, as driven by [Eliah Kagan](https://github.com/EliahKagan), we brought `prodash`, `cargo-smart-release` and `learning-Rust-with-Gitoxide` into the GitoxideLabs organization. +From here they will get more timely security updates and patches, and maybe even some improvements here and there. + +## Community + +### An even faster "Blame" with caching + +Even though it's not quite done, yet, I thought it was worth highlighting that Fractional has been working on [adding caching support](https://github.com/GitoxideLabs/gitoxide/pull/1852) for `gix blame`, with examples showing a 80x speedup! +When merged, `gitoxide` will be able to support a new generation of investigative tooling that quickly tells users where lines have been changed, and more. + +### Gix in Cargo + +Thanks to the generous support of [the Rustweek organisers](https://rustweek.org/unconf-intro/) Christoph Rüßler and me will have the opportunity to join the Critical Infrastructure group of the [Unconference](https://rustweek.org/unconf/). There, I hope to get in touch with users of Gitoxide, and of course, the Cargo team to finally meet in person :). And of course, I'd love to finish the [STF application](https://github.com/GitoxideLabs/gitoxide/issues/1406) to get a grant supporting `gitoxide` development, which ideally will be beneficial for `zlib-rs` as well. +With a grant, feature development could be sped up, and I could work on `gitoxide` more as well. + +Cheers +Sebastian + +PS: The latest timesheets can be found [here (2025)](https://github.com/Byron/byron/blob/main/timesheets/2025.csv). \ No newline at end of file diff --git a/examples/log.rs b/examples/log.rs index 37e3a9f7b7f..0ca592cb57d 100644 --- a/examples/log.rs +++ b/examples/log.rs @@ -150,7 +150,7 @@ fn run(args: Args) -> anyhow::Result<()> { commit_ref.author.actor().write_to(&mut buf)?; buf.into() }, - time: commit_ref.author.time.format(format::DEFAULT), + time: commit_ref.author.time()?.format(format::DEFAULT), message: commit_ref.message.to_owned(), }) }), diff --git a/examples/ls-tree.rs b/examples/ls-tree.rs index 17af144040f..fdce7c14cb4 100644 --- a/examples/ls-tree.rs +++ b/examples/ls-tree.rs @@ -54,8 +54,8 @@ fn run(args: Args) -> anyhow::Result<()> { for entry in entries { writeln!( out, - "{:06o} {:4} {} {}", - *entry.mode, + "{:>6o} {:4} {} {}", + entry.mode, entry.mode.as_str(), entry.hash, entry.path diff --git a/gitoxide-core/CHANGELOG.md b/gitoxide-core/CHANGELOG.md index ef80cea17fb..ae3d157bd5d 100644 --- a/gitoxide-core/CHANGELOG.md +++ b/gitoxide-core/CHANGELOG.md @@ -5,6 +5,91 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.47.1 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.47.0 (2025-04-25) + +### Bug Fixes + + - Adapt to changes in gix-actor + Use the committer date and author date that are now backed by bytes and + interpret these bytes into a `gix_date::Time` on demand. + - Use less ambiguous "kB" for SI kilobyte + `gix free pack verify --statistics` formerly used "KB" for + kilobytes (i.e., SI decimal kilobytes, units of 1000 bytes). This + was somewhat ambiguous because it is occasionally also used for + kibibytes (i.e., IEC binary kibibytes, units of 1024 bytes). + + Kilobytes and kibibytes can be more precisely distinguished by + using kB for kilobytes (since "k" is the SI prefix for "kilo") and + KiB for kibibytes (since decimal kilobytes are never written KiB). + + This adapts `gitoxide-core` to changes in `bytesize` and, in so + doing, allows the SI unit symbol "kB" to be used. + +### Commit Statistics + + + + - 22 commits contributed to the release. + - 2 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Thanks Clippy + + + +[Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Thanks clippy ([`6f009d7`](https://github.com/GitoxideLabs/gitoxide/commit/6f009d781da9e931d44b113a925a80e77e8788af)) + - Adapt to changes in `gix-date` and `gix-actor` ([`afdf1a5`](https://github.com/GitoxideLabs/gitoxide/commit/afdf1a5d5c9fb2645f481c17f580ad59d14d6095)) + - Refactor ([`e9ac514`](https://github.com/GitoxideLabs/gitoxide/commit/e9ac5147289d2875db9886c54ecd046f50f164cc)) + - Apply feedback from discussion ([`70097c0`](https://github.com/GitoxideLabs/gitoxide/commit/70097c0feb481541ed96358842de96d6b1af24a9)) + - Adapt to changes in gix-actor ([`b07f907`](https://github.com/GitoxideLabs/gitoxide/commit/b07f907ba2e01849744c72df35dac57b624f2f85)) + - Merge pull request #1968 from GitoxideLabs/dependabot/cargo/cargo-bd18780e40 ([`46227e6`](https://github.com/GitoxideLabs/gitoxide/commit/46227e6d1ddc0879662730e5bb21a8597716b1ca)) + - Bump the cargo group with 40 updates ([`06bf1e1`](https://github.com/GitoxideLabs/gitoxide/commit/06bf1e1552de65ce692911bdc4c501d487bbc3d7)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Use less ambiguous "kB" for SI kilobyte ([`77a3a1b`](https://github.com/GitoxideLabs/gitoxide/commit/77a3a1b85521ec87495a73151dd422e2cde49f99)) + - Adapt `gitoxide-core` to changes in `sysinfo` ([`417917f`](https://github.com/GitoxideLabs/gitoxide/commit/417917f3cb488eee155cdcc75f88dcd7b42d3c95)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1944 from GitoxideLabs/dependabot/cargo/cargo-ea4584273b ([`79dabb0`](https://github.com/GitoxideLabs/gitoxide/commit/79dabb0a062a795b1dc5c9c840d67474dc6b343b)) + - Bump crossbeam-channel from 0.5.14 to 0.5.15 in the cargo group ([`1792178`](https://github.com/GitoxideLabs/gitoxide/commit/1792178cbed5abf4782370bc46207a8c5d113615)) + - Merge pull request #1917 from pierrechevalier83/issue_1887 ([`6307f57`](https://github.com/GitoxideLabs/gitoxide/commit/6307f571f969eb7ff2490e4c68dc7994fb2fecac)) + - Adapt to changes in gix-object ([`8969245`](https://github.com/GitoxideLabs/gitoxide/commit/8969245a6b5874d8524f508569ae1266e48d100e)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.46.0 (2025-04-04) @@ -29,6 +114,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - use UnifiedDiff instead of UnifiedDiffBuilder - use revspecs for revision and path +### Bug Fixes + + - Adapt to changes in gix-actor + Use the committer date and author date that are now backed by bytes and + interpret these bytes into a `gix_date::Time` on demand. + - Use less ambiguous "kB" for SI kilobyte + `gix free pack verify --statistics` formerly used "KB" for + kilobytes (i.e., SI decimal kilobytes, units of 1000 bytes). This + was somewhat ambiguous because it is occasionally also used for + kibibytes (i.e., IEC binary kibibytes, units of 1024 bytes). + + Kilobytes and kibibytes can be more precisely distinguished by + using kB for kilobytes (since "k" is the SI prefix for "kilo") and + KiB for kibibytes (since decimal kilobytes are never written KiB). + + This adapts `gitoxide-core` to changes in `bytesize` and, in so + doing, allows the SI unit symbol "kB" to be used. + ### Changed (BREAKING) - adjust hash verification return types for the common interface @@ -41,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 25 commits contributed to the release. + - 28 commits contributed to the release. - 7 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -58,6 +161,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`d248e3d`](https://github.com/GitoxideLabs/gitoxide/commit/d248e3d87d45ca3983cb9fd7c6143dacbd8301cc)) + - Release gix-sec v0.10.12, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`ada5a94`](https://github.com/GitoxideLabs/gitoxide/commit/ada5a9447dc3c210afbd8866fe939c3f3a024226)) + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1915 from emilazy/push-qvyqmopsoltr ([`4660f7a`](https://github.com/GitoxideLabs/gitoxide/commit/4660f7a6f71873311f68f170b0f1f6659a02829d)) - Adjust hash verification return types for the common interface ([`54e5764`](https://github.com/GitoxideLabs/gitoxide/commit/54e57649f0e0b15c0bd1d3233e41524cb91a8cb9)) diff --git a/gitoxide-core/Cargo.toml b/gitoxide-core/Cargo.toml index 6a255795d4d..f5c0ae1152f 100644 --- a/gitoxide-core/Cargo.toml +++ b/gitoxide-core/Cargo.toml @@ -4,7 +4,7 @@ lints.workspace = true name = "gitoxide-core" description = "The library implementing all capabilities of the gitoxide CLI" repository = "https://github.com/GitoxideLabs/gitoxide" -version = "0.46.0" +version = "0.47.1" authors = ["Sebastian Thiel "] license = "MIT OR Apache-2.0" edition = "2021" @@ -49,17 +49,17 @@ serde = ["gix/serde", "dep:serde_json", "dep:serde", "bytesize/serde"] [dependencies] # deselect everything else (like "performance") as this should be controllable by the parent application. -gix = { version = "^0.71.0", path = "../gix", default-features = false, features = ["merge", "blob-diff", "blame", "revision", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt", "status", "dirwalk"] } -gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.58.0", path = "../gix-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static", "generate", "streaming-input"] } -gix-transport-configuration-only = { package = "gix-transport", version = "^0.46.0", path = "../gix-transport", default-features = false } -gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.20.0", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] } -gix-status = { version = "^0.18.0", path = "../gix-status" } -gix-fsck = { version = "^0.10.0", path = "../gix-fsck" } +gix = { version = "^0.72.1", path = "../gix", default-features = false, features = ["merge", "blob-diff", "blame", "revision", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt", "status", "dirwalk"] } +gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.59.1", path = "../gix-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static", "generate", "streaming-input"] } +gix-transport-configuration-only = { package = "gix-transport", version = "^0.47.0", path = "../gix-transport", default-features = false } +gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.21.1", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] } +gix-status = { version = "^0.19.1", path = "../gix-status" } +gix-fsck = { version = "^0.11.1", path = "../gix-fsck" } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -anyhow = "1.0.42" +anyhow = "1.0.98" thiserror = "2.0.0" -bytesize = "1.0.1" -tempfile = "3.1.0" +bytesize = "2.0.1" +tempfile = "3.19.1" # for async-client async-trait = { version = "0.1.51", optional = true } @@ -70,27 +70,27 @@ futures-io = { version = "0.3.16", optional = true } blocking = { version = "1.0.2", optional = true } # for 'organize' functionality -gix-url = { version = "^0.30.0", path = "../gix-url", optional = true } +gix-url = { version = "^0.31.0", path = "../gix-url", optional = true } jwalk = { version = "0.8.0", optional = true } # for 'hours' -fs-err = { version = "2.6.0", optional = true } -crossbeam-channel = { version = "0.5.6", optional = true } -smallvec = { version = "1.10.0", optional = true } +fs-err = { version = "3.1.0", optional = true } +crossbeam-channel = { version = "0.5.15", optional = true } +smallvec = { version = "1.15.0", optional = true } # for 'query' and 'corpus' -rusqlite = { version = "0.32.1", optional = true, features = ["bundled"] } +rusqlite = { version = "0.35.0", optional = true, features = ["bundled"] } # for 'corpus' parking_lot = { version = "0.12.1", optional = true } -sysinfo = { version = "0.31.2", optional = true, default-features = false, features = ["system"] } +sysinfo = { version = "0.34.2", optional = true, default-features = false, features = ["system"] } serde_json = { version = "1.0.65", optional = true } tracing-forest = { version = "0.1.5", features = ["serde"], optional = true } tracing-subscriber = { version = "0.3.17", optional = true } tracing = { version = "0.1.37", optional = true } # for svg graph output -layout-rs = "0.1.1" +layout-rs = "0.1.3" open = "5.0.0" document-features = { version = "0.2.0", optional = true } diff --git a/gitoxide-core/src/corpus/db.rs b/gitoxide-core/src/corpus/db.rs index f1ee3f6ec3e..6b9640f7bcd 100644 --- a/gitoxide-core/src/corpus/db.rs +++ b/gitoxide-core/src/corpus/db.rs @@ -118,7 +118,7 @@ pub fn create(path: impl AsRef) -> anyhow::Result) -> anyhow::Result anyhow::Result { - let sys = - sysinfo::System::new_with_specifics(RefreshKind::new().with_cpu(CpuRefreshKind::new().with_frequency())); + let sys = sysinfo::System::new_with_specifics( + RefreshKind::nothing().with_cpu(CpuRefreshKind::nothing().with_frequency()), + ); let cpu = &sys.cpus()[0]; let vendor = Some(cpu.vendor_id().to_owned()); let host = sysinfo::System::host_name(); diff --git a/gitoxide-core/src/corpus/engine.rs b/gitoxide-core/src/corpus/engine.rs index e48292246d6..6482cea9c78 100644 --- a/gitoxide-core/src/corpus/engine.rs +++ b/gitoxide-core/src/corpus/engine.rs @@ -57,8 +57,9 @@ impl Engine { let repos = self.refresh_repos(&corpus_path, corpus_id)?; self.state.progress.set_name("refresh repos".into()); self.state.progress.info(format!( - "Added or updated {} repositories under {corpus_path:?}", - repos.len() + "Added or updated {} repositories under '{corpus_path}'", + repos.len(), + corpus_path = corpus_path.display(), )); Ok(()) } @@ -316,7 +317,7 @@ impl Engine { out.push(repo); progress.inc(); } - Err(err) => progress.fail(format!("{repo_path:?}: {err:#?}")), + Err(err) => progress.fail(format!("{repo_path}: {err:#?}", repo_path = repo_path.display())), } } statement.finalize()?; diff --git a/gitoxide-core/src/hours/core.rs b/gitoxide-core/src/hours/core.rs index 58221ca638c..f76e46e31a2 100644 --- a/gitoxide-core/src/hours/core.rs +++ b/gitoxide-core/src/hours/core.rs @@ -17,7 +17,7 @@ const MINUTES_PER_HOUR: f32 = 60.0; pub const HOURS_PER_WORKDAY: f32 = 8.0; pub fn estimate_hours( - commits: &[(u32, gix::actor::SignatureRef<'static>)], + commits: &[(u32, super::SignatureRef<'static>)], stats: &[(u32, FileStats, LineStats)], ) -> WorkByEmail { assert!(!commits.is_empty()); @@ -31,7 +31,7 @@ pub fn estimate_hours( let mut cur = commits.next().expect("at least one commit if we are here"); for next in commits { - let change_in_minutes = (next.time.seconds.saturating_sub(cur.time.seconds)) as f32 / MINUTES_PER_HOUR; + let change_in_minutes = (next.seconds().saturating_sub(cur.seconds())) as f32 / MINUTES_PER_HOUR; if change_in_minutes < MAX_COMMIT_DIFFERENCE_IN_MINUTES { hours += change_in_minutes / MINUTES_PER_HOUR; } else { @@ -44,8 +44,8 @@ pub fn estimate_hours( }; let author = &commits[0].1; - let (files, lines) = (!stats.is_empty()) - .then(|| { + let (files, lines) = if !stats.is_empty() { + { commits .iter() .map(|t| &t.0) @@ -60,8 +60,10 @@ pub fn estimate_hours( } Err(_) => acc, }) - }) - .unwrap_or_default(); + } + } else { + Default::default() + }; WorkByEmail { name: author.name, email: author.email, @@ -166,13 +168,11 @@ pub fn spawn_tree_delta_threads<'scope>( (true, true) => { files.modified += 1; if let Some(cache) = cache.as_mut() { - let mut diff = change.diff(cache).map_err(|err| { - std::io::Error::new(std::io::ErrorKind::Other, err) - })?; + let mut diff = change.diff(cache).map_err(std::io::Error::other)?; let mut nl = 0; - if let Some(counts) = diff.line_counts().map_err(|err| { - std::io::Error::new(std::io::ErrorKind::Other, err) - })? { + if let Some(counts) = + diff.line_counts().map_err(std::io::Error::other)? + { nl += counts.insertions as usize + counts.removals as usize; lines.added += counts.insertions as usize; lines.removed += counts.removals as usize; diff --git a/gitoxide-core/src/hours/mod.rs b/gitoxide-core/src/hours/mod.rs index b233e013d46..bdc4f585839 100644 --- a/gitoxide-core/src/hours/mod.rs +++ b/gitoxide-core/src/hours/mod.rs @@ -2,7 +2,6 @@ use std::{collections::BTreeSet, io, path::Path, time::Instant}; use anyhow::bail; use gix::{ - actor, bstr::{BStr, ByteSlice}, prelude::*, progress, Count, NestedProgress, Progress, @@ -27,6 +26,18 @@ pub struct Context { pub out: W, } +pub struct SignatureRef<'a> { + name: &'a BStr, + email: &'a BStr, + time: gix::date::Time, +} + +impl SignatureRef<'_> { + fn seconds(&self) -> gix::date::SecondsSinceUnixEpoch { + self.time.seconds + } +} + /// Estimate the hours it takes to produce the content of the repository in `_working_dir_`, with `_refname_` for /// the start of the commit graph traversal. /// @@ -85,7 +96,7 @@ where out.push(( commit_idx, - actor::SignatureRef { + SignatureRef { name, email, time: author.time, @@ -97,13 +108,13 @@ where out.sort_by(|a, b| { a.1.email .cmp(b.1.email) - .then(a.1.time.seconds.cmp(&b.1.time.seconds).reverse()) + .then(a.1.seconds().cmp(&b.1.seconds()).reverse()) }); Ok(out) }); - let (stats_progresses, stats_counters) = needs_stats - .then(|| { + let (stats_progresses, stats_counters) = if needs_stats { + { let mut sp = progress.add_child("extract stats"); sp.init(None, progress::count("commits")); let sc = sp.counter(); @@ -117,14 +128,16 @@ where let lc = lp.counter(); (Some((sp, cp, lp)), Some((sc, cc, lc))) - }) - .unwrap_or_default(); + } + } else { + Default::default() + }; let mut progress = progress.add_child("traverse commit graph"); progress.init(None, progress::count("commits")); - let (tx_tree_id, stat_threads) = needs_stats - .then(|| { + let (tx_tree_id, stat_threads) = if needs_stats { + { let (tx, threads) = spawn_tree_delta_threads( scope, threads, @@ -133,8 +146,10 @@ where stats_counters.clone().expect("counters are set"), ); (Some(tx), threads) - }) - .unwrap_or_default(); + } + } else { + Default::default() + }; let mut commit_idx = 0_u32; let mut skipped_merge_commits = 0; @@ -285,7 +300,7 @@ where total_hours, total_hours / HOURS_PER_WORKDAY, total_commits, - is_shallow.then_some(" (shallow)").unwrap_or_default(), + if is_shallow { " (shallow)" } else { Default::default() }, num_authors )?; if file_stats { diff --git a/gitoxide-core/src/index/checkout.rs b/gitoxide-core/src/index/checkout.rs index 7c518d15113..35320afaf5d 100644 --- a/gitoxide-core/src/index/checkout.rs +++ b/gitoxide-core/src/index/checkout.rs @@ -115,17 +115,18 @@ pub fn checkout_exclusive( progress.done(format!( "Created {} {} files{} ({})", files_updated, - no_repo.then_some("empty").unwrap_or_default(), - should_interrupt - .load(Ordering::Relaxed) - .then(|| { + if no_repo { "empty" } else { Default::default() }, + if should_interrupt.load(Ordering::Relaxed) { + { format!( " of {}", entries_for_checkout .saturating_sub(errors.len() + collisions.len() + delayed_paths_unprocessed.len()) ) - }) - .unwrap_or_default(), + } + } else { + Default::default() + }, gix::progress::bytes() .unwrap() .display(bytes_written as usize, None, None) diff --git a/gitoxide-core/src/lib.rs b/gitoxide-core/src/lib.rs index a33b76a349a..8b24ab2e51e 100644 --- a/gitoxide-core/src/lib.rs +++ b/gitoxide-core/src/lib.rs @@ -30,9 +30,10 @@ #![deny(rust_2018_idioms)] #![forbid(unsafe_code)] -use anyhow::bail; use std::str::FromStr; +use anyhow::bail; + #[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)] pub enum OutputFormat { Human, diff --git a/gitoxide-core/src/organize.rs b/gitoxide-core/src/organize.rs index 4b7000af62d..625e328411f 100644 --- a/gitoxide-core/src/organize.rs +++ b/gitoxide-core/src/organize.rs @@ -1,5 +1,5 @@ -use std::borrow::Cow; use std::{ + borrow::Cow, ffi::OsStr, path::{Path, PathBuf}, }; @@ -138,9 +138,9 @@ fn handle( if let Some(parent_repo_path) = find_parent_repo(git_workdir) { progress.fail(format!( - "Skipping repository at {:?} as it is nested within repository {:?}", + "Skipping repository at '{}' as it is nested within repository '{}'", git_workdir.display(), - parent_repo_path + parent_repo_path.display() )); return Ok(()); } @@ -157,7 +157,7 @@ fn handle( }; if url.path.is_empty() { progress.info(format!( - "Skipping repository at {:?} whose remote does not have a path: {:?}", + "Skipping repository at '{}' whose remote does not have a path: {}", git_workdir.display(), url.to_bstring() )); diff --git a/gitoxide-core/src/pack/receive.rs b/gitoxide-core/src/pack/receive.rs index 5c717ed12db..66b64d95f24 100644 --- a/gitoxide-core/src/pack/receive.rs +++ b/gitoxide-core/src/pack/receive.rs @@ -1,10 +1,10 @@ -use crate::net; -use crate::pack::receive::protocol::fetch::negotiate; -use crate::OutputFormat; -use gix::config::tree::Key; -use gix::protocol::maybe_async; -use gix::remote::fetch::Error; -use gix::DynNestedProgress; +use std::{ + io, + path::PathBuf, + sync::{atomic::AtomicBool, Arc}, +}; + +use gix::{config::tree::Key, protocol::maybe_async, remote::fetch::Error, DynNestedProgress}; pub use gix::{ hash::ObjectId, objs::bstr::{BString, ByteSlice}, @@ -18,11 +18,8 @@ pub use gix::{ }, NestedProgress, Progress, }; -use std::{ - io, - path::PathBuf, - sync::{atomic::AtomicBool, Arc}, -}; + +use crate::{net, pack::receive::protocol::fetch::negotiate, OutputFormat}; pub const PROGRESS_RANGE: std::ops::RangeInclusive = 1..=3; pub struct Context { @@ -294,7 +291,7 @@ fn receive_pack_blocking( None::, options, ) - .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; + .map_err(io::Error::other)?; if let Some(directory) = refs_directory.take() { write_raw_refs(refs, directory)?; diff --git a/gitoxide-core/src/pack/verify.rs b/gitoxide-core/src/pack/verify.rs index 0e6a5d3bdfd..837475aab63 100644 --- a/gitoxide-core/src/pack/verify.rs +++ b/gitoxide-core/src/pack/verify.rs @@ -236,10 +236,10 @@ fn print_statistics(out: &mut impl io::Write, stats: &index::traverse::Statistic #[rustfmt::skip] writeln!( out, "\t{:) -> anyhow::Result match con.close() { Ok(()) => { - std::fs::remove_file(path) - .with_context(|| format!("Failed to remove incompatible database file at {path:?}"))?; + std::fs::remove_file(path).with_context(|| { + format!( + "Failed to remove incompatible database file at {path}", + path = path.display() + ) + })?; con = rusqlite::Connection::open(path)?; con.execute_batch(meta_table)?; con.execute("INSERT into meta(version) values(?)", params![VERSION])?; diff --git a/gitoxide-core/src/query/engine/command.rs b/gitoxide-core/src/query/engine/command.rs index 31246b0676d..1b020030821 100644 --- a/gitoxide-core/src/query/engine/command.rs +++ b/gitoxide-core/src/query/engine/command.rs @@ -76,7 +76,7 @@ impl query::Engine { usize, ) = row?; let id = gix::ObjectId::from(hash); - let commit_time = id.attach(&self.repo).object()?.into_commit().committer()?.time; + let commit_time = id.attach(&self.repo).object()?.into_commit().committer()?.time()?; let mode = FileMode::from_usize(mode).context("invalid file mode")?; info.push(trace_path::Info { id, diff --git a/gitoxide-core/src/repository/archive.rs b/gitoxide-core/src/repository/archive.rs index c229fe976b8..0f61b387a71 100644 --- a/gitoxide-core/src/repository/archive.rs +++ b/gitoxide-core/src/repository/archive.rs @@ -84,7 +84,7 @@ fn fetch_rev_info( Ok(match object.kind { gix::object::Kind::Commit => { let commit = object.into_commit(); - (Some(commit.committer()?.time.seconds), commit.tree_id()?.detach()) + (Some(commit.committer()?.seconds()), commit.tree_id()?.detach()) } gix::object::Kind::Tree => (None, object.id), gix::object::Kind::Tag => fetch_rev_info(object.peel_to_kind(gix::object::Kind::Commit)?)?, diff --git a/gitoxide-core/src/repository/attributes/query.rs b/gitoxide-core/src/repository/attributes/query.rs index b12421e77df..6929f4b9bbd 100644 --- a/gitoxide-core/src/repository/attributes/query.rs +++ b/gitoxide-core/src/repository/attributes/query.rs @@ -8,10 +8,10 @@ pub struct Options { } pub(crate) mod function { + use std::{borrow::Cow, io, path::Path}; + use anyhow::bail; use gix::bstr::BStr; - use std::borrow::Cow; - use std::{io, path::Path}; use crate::{ is_dir_to_mode, diff --git a/gitoxide-core/src/repository/attributes/validate_baseline.rs b/gitoxide-core/src/repository/attributes/validate_baseline.rs index 51de5d5382b..763b14a4325 100644 --- a/gitoxide-core/src/repository/attributes/validate_baseline.rs +++ b/gitoxide-core/src/repository/attributes/validate_baseline.rs @@ -44,8 +44,8 @@ pub(crate) mod function { if repo.is_bare() { writeln!( err, - "Repo {:?} is bare - disabling git-ignore baseline as `git check-ignore` needs a worktree", - repo.path() + "Repo at '{repo}' is bare - disabling git-ignore baseline as `git check-ignore` needs a worktree", + repo = repo.path().display() ) .ok(); ignore = false; diff --git a/gitoxide-core/src/repository/blame.rs b/gitoxide-core/src/repository/blame.rs index 04744515343..0d42c75f9e0 100644 --- a/gitoxide-core/src/repository/blame.rs +++ b/gitoxide-core/src/repository/blame.rs @@ -1,7 +1,7 @@ -use gix::bstr::ByteSlice; -use gix::config::tree; use std::ffi::OsStr; +use gix::{bstr::ByteSlice, config::tree}; + pub fn blame_file( mut repo: gix::Repository, file: &OsStr, diff --git a/gitoxide-core/src/repository/cat.rs b/gitoxide-core/src/repository/cat.rs index 2407b4c0a0e..72433ed2d3d 100644 --- a/gitoxide-core/src/repository/cat.rs +++ b/gitoxide-core/src/repository/cat.rs @@ -1,8 +1,7 @@ -use crate::repository::revision::resolve::{BlobFormat, TreeMode}; use anyhow::{anyhow, Context}; -use gix::diff::blob::ResourceKind; -use gix::filter::plumbing::driver::apply::Delay; -use gix::revision::Spec; +use gix::{diff::blob::ResourceKind, filter::plumbing::driver::apply::Delay, revision::Spec}; + +use crate::repository::revision::resolve::{BlobFormat, TreeMode}; pub fn display_object( repo: &gix::Repository, diff --git a/gitoxide-core/src/repository/clean.rs b/gitoxide-core/src/repository/clean.rs index 1146f4b2fb0..f1e68357c57 100644 --- a/gitoxide-core/src/repository/clean.rs +++ b/gitoxide-core/src/repository/clean.rs @@ -20,17 +20,23 @@ pub struct Options { pub find_untracked_repositories: FindRepository, } pub(crate) mod function { - use crate::repository::clean::{FindRepository, Options}; - use crate::OutputFormat; + use std::{borrow::Cow, path::Path}; + use anyhow::bail; - use gix::bstr::BString; - use gix::bstr::ByteSlice; - use gix::dir::entry::{Kind, Status}; - use gix::dir::walk::EmissionMode::CollapseDirectory; - use gix::dir::walk::ForDeletionMode::*; - use gix::dir::{walk, EntryRef}; - use std::borrow::Cow; - use std::path::Path; + use gix::{ + bstr::{BString, ByteSlice}, + dir::{ + entry::{Kind, Status}, + walk, + walk::{EmissionMode::CollapseDirectory, ForDeletionMode::*}, + EntryRef, + }, + }; + + use crate::{ + repository::clean::{FindRepository, Options}, + OutputFormat, + }; pub fn clean( repo: gix::Repository, @@ -231,7 +237,7 @@ pub(crate) mod function { out, "{maybe}{suffix} {}{} {status}", display_path.display(), - disk_kind.is_dir().then_some("/").unwrap_or_default(), + if disk_kind.is_dir() { "/" } else { Default::default() }, status = match entry.status { Status::Ignored(kind) => { Cow::Owned(format!( diff --git a/gitoxide-core/src/repository/config.rs b/gitoxide-core/src/repository/config.rs index 6d87c539e9b..7f647b42c4f 100644 --- a/gitoxide-core/src/repository/config.rs +++ b/gitoxide-core/src/repository/config.rs @@ -94,11 +94,15 @@ fn write_meta(meta: &gix::config::file::Metadata, out: &mut impl std::io::Write) .as_deref() .map_or_else(|| "memory".into(), |p| p.display().to_string()), meta.source, - (meta.level != 0) - .then(|| format!(", include level {}", meta.level)) - .unwrap_or_default(), - (meta.trust != gix::sec::Trust::Full) - .then_some(", untrusted") - .unwrap_or_default() + if meta.level != 0 { + format!(", include level {}", meta.level) + } else { + Default::default() + }, + if meta.trust != gix::sec::Trust::Full { + ", untrusted" + } else { + Default::default() + } ) } diff --git a/gitoxide-core/src/repository/diff.rs b/gitoxide-core/src/repository/diff.rs index 9e6c6d2edae..a0396599b81 100644 --- a/gitoxide-core/src/repository/diff.rs +++ b/gitoxide-core/src/repository/diff.rs @@ -1,12 +1,16 @@ use anyhow::Context; -use gix::bstr::{BString, ByteSlice}; -use gix::diff::blob::intern::TokenSource; -use gix::diff::blob::unified_diff::{ContextSize, NewlineSeparator}; -use gix::diff::blob::UnifiedDiff; -use gix::objs::tree::EntryMode; -use gix::odb::store::RefreshMode; -use gix::prelude::ObjectIdExt; -use gix::ObjectId; +use gix::{ + bstr::{BString, ByteSlice}, + diff::blob::{ + intern::TokenSource, + unified_diff::{ContextSize, NewlineSeparator}, + UnifiedDiff, + }, + objs::tree::EntryMode, + odb::store::RefreshMode, + prelude::ObjectIdExt, + ObjectId, +}; pub fn tree( mut repo: gix::Repository, @@ -49,7 +53,7 @@ fn write_changes( } => { writeln!(out, "A: {}", typed_location(location, entry_mode))?; writeln!(out, " {}", id.attach(repo).shorten_or_id())?; - writeln!(out, " -> {:o}", entry_mode.0)?; + writeln!(out, " -> {entry_mode:o}")?; } gix::diff::tree_with_rewrites::Change::Deletion { location, @@ -59,7 +63,7 @@ fn write_changes( } => { writeln!(out, "D: {}", typed_location(location, entry_mode))?; writeln!(out, " {}", id.attach(repo).shorten_or_id())?; - writeln!(out, " {:o} ->", entry_mode.0)?; + writeln!(out, " {entry_mode:o} ->")?; } gix::diff::tree_with_rewrites::Change::Modification { location, @@ -76,7 +80,7 @@ fn write_changes( id = id.attach(repo).shorten_or_id() )?; if previous_entry_mode != entry_mode { - writeln!(out, " {:o} -> {:o}", previous_entry_mode.0, entry_mode.0)?; + writeln!(out, " {previous_entry_mode:o} -> {entry_mode:o}")?; } } gix::diff::tree_with_rewrites::Change::Rewrite { @@ -101,7 +105,7 @@ fn write_changes( id = id.attach(repo).shorten_or_id() )?; if source_entry_mode != entry_mode { - writeln!(out, " {:o} -> {:o}", source_entry_mode.0, entry_mode.0)?; + writeln!(out, " {source_entry_mode:o} -> {entry_mode:o}")?; } } } diff --git a/gitoxide-core/src/repository/dirty.rs b/gitoxide-core/src/repository/dirty.rs index 8981199d532..44d176b4f05 100644 --- a/gitoxide-core/src/repository/dirty.rs +++ b/gitoxide-core/src/repository/dirty.rs @@ -1,6 +1,7 @@ -use crate::OutputFormat; use anyhow::bail; +use crate::OutputFormat; + pub enum Mode { IsClean, IsDirty, diff --git a/gitoxide-core/src/repository/fetch.rs b/gitoxide-core/src/repository/fetch.rs index 7be5ef9d076..21198349bb3 100644 --- a/gitoxide-core/src/repository/fetch.rs +++ b/gitoxide-core/src/repository/fetch.rs @@ -169,7 +169,7 @@ pub(crate) mod function { let start = std::time::Instant::now(); progress.set_name("layout graph".into()); - progress.info(format!("writing {path:?}…")); + progress.info(format!("writing {}…", path.display())); let mut svg = SVGWriter::new(); vg.do_it(false, false, false, &mut svg); std::fs::write(path, svg.finalize().as_bytes())?; diff --git a/gitoxide-core/src/repository/index/entries.rs b/gitoxide-core/src/repository/index/entries.rs index 470fdd3bd0b..e72a46b483b 100644 --- a/gitoxide-core/src/repository/index/entries.rs +++ b/gitoxide-core/src/repository/index/entries.rs @@ -23,9 +23,9 @@ pub(crate) mod function { io::{BufWriter, Write}, }; - use gix::index::entry::Stage; use gix::{ bstr::{BStr, BString}, + index::entry::Stage, worktree::IndexPersistedOrInMemory, Repository, }; diff --git a/gitoxide-core/src/repository/mailmap.rs b/gitoxide-core/src/repository/mailmap.rs index 44fc0036155..9252bdafde0 100644 --- a/gitoxide-core/src/repository/mailmap.rs +++ b/gitoxide-core/src/repository/mailmap.rs @@ -1,7 +1,7 @@ -use anyhow::bail; -use gix::bstr::{BString, ByteSlice}; use std::io; +use anyhow::bail; +use gix::bstr::{BString, ByteSlice}; #[cfg(feature = "serde")] use gix::mailmap::Entry; diff --git a/gitoxide-core/src/repository/merge/commit.rs b/gitoxide-core/src/repository/merge/commit.rs index 6982cc2b8a7..a745962dff9 100644 --- a/gitoxide-core/src/repository/merge/commit.rs +++ b/gitoxide-core/src/repository/merge/commit.rs @@ -1,11 +1,12 @@ -use crate::OutputFormat; use anyhow::{anyhow, bail, Context}; -use gix::bstr::BString; -use gix::bstr::ByteSlice; -use gix::merge::tree::TreatAsUnresolved; -use gix::prelude::Write; +use gix::{ + bstr::{BString, ByteSlice}, + merge::tree::TreatAsUnresolved, + prelude::Write, +}; use super::tree::Options; +use crate::OutputFormat; #[allow(clippy::too_many_arguments)] pub fn commit( diff --git a/gitoxide-core/src/repository/merge/file.rs b/gitoxide-core/src/repository/merge/file.rs index 7e183c8a9e6..4fde1bbf24d 100644 --- a/gitoxide-core/src/repository/merge/file.rs +++ b/gitoxide-core/src/repository/merge/file.rs @@ -1,15 +1,19 @@ -use crate::OutputFormat; -use anyhow::{anyhow, bail, Context}; -use gix::bstr::BString; -use gix::bstr::ByteSlice; -use gix::merge::blob::builtin_driver::binary; -use gix::merge::blob::builtin_driver::text::Conflict; -use gix::merge::blob::pipeline::WorktreeRoots; -use gix::merge::blob::{Resolution, ResourceKind}; -use gix::object::tree::EntryKind; -use gix::Id; use std::path::Path; +use anyhow::{anyhow, bail, Context}; +use gix::{ + bstr::{BString, ByteSlice}, + merge::blob::{ + builtin_driver::{binary, text::Conflict}, + pipeline::WorktreeRoots, + Resolution, ResourceKind, + }, + object::tree::EntryKind, + Id, +}; + +use crate::OutputFormat; + pub fn file( repo: gix::Repository, out: &mut dyn std::io::Write, diff --git a/gitoxide-core/src/repository/merge/tree.rs b/gitoxide-core/src/repository/merge/tree.rs index 0d6467b09da..1a008208a2d 100644 --- a/gitoxide-core/src/repository/merge/tree.rs +++ b/gitoxide-core/src/repository/merge/tree.rs @@ -10,14 +10,15 @@ pub struct Options { pub(super) mod function { - use crate::OutputFormat; use anyhow::{anyhow, bail, Context}; - use gix::bstr::BString; - use gix::bstr::ByteSlice; - use gix::merge::tree::TreatAsUnresolved; - use gix::prelude::Write; + use gix::{ + bstr::{BString, ByteSlice}, + merge::tree::TreatAsUnresolved, + prelude::Write, + }; use super::Options; + use crate::OutputFormat; #[allow(clippy::too_many_arguments)] pub fn tree( diff --git a/gitoxide-core/src/repository/merge_base.rs b/gitoxide-core/src/repository/merge_base.rs index 8a0b8515c8d..b6140ec9d4b 100644 --- a/gitoxide-core/src/repository/merge_base.rs +++ b/gitoxide-core/src/repository/merge_base.rs @@ -1,6 +1,7 @@ -use crate::OutputFormat; use anyhow::bail; +use crate::OutputFormat; + pub fn merge_base( mut repo: gix::Repository, first: String, diff --git a/gitoxide-core/src/repository/odb.rs b/gitoxide-core/src/repository/odb.rs index c386450c8d6..599e6f7e42e 100644 --- a/gitoxide-core/src/repository/odb.rs +++ b/gitoxide-core/src/repository/odb.rs @@ -1,5 +1,4 @@ -use std::io; -use std::sync::atomic::Ordering; +use std::{io, sync::atomic::Ordering}; use anyhow::bail; diff --git a/gitoxide-core/src/repository/revision/list.rs b/gitoxide-core/src/repository/revision/list.rs index 1698a29d494..c47f1bc3b27 100644 --- a/gitoxide-core/src/repository/revision/list.rs +++ b/gitoxide-core/src/repository/revision/list.rs @@ -117,7 +117,7 @@ pub(crate) mod function { if let Some((mut vg, path, _)) = vg { let start = std::time::Instant::now(); progress.set_name("layout graph".into()); - progress.info(format!("writing {path:?}…")); + progress.info(format!("writing {}…", path.display())); let mut svg = SVGWriter::new(); vg.do_it(false, false, false, &mut svg); std::fs::write(&path, svg.finalize().as_bytes())?; diff --git a/gitoxide-core/src/repository/revision/resolve.rs b/gitoxide-core/src/repository/revision/resolve.rs index 60686d14830..7ef4c5bd9a2 100644 --- a/gitoxide-core/src/repository/revision/resolve.rs +++ b/gitoxide-core/src/repository/revision/resolve.rs @@ -28,9 +28,10 @@ pub(crate) mod function { use gix::revision::Spec; use super::Options; - use crate::repository::cat::display_object; - use crate::repository::revision::resolve::BlobFormat; - use crate::{repository::revision, OutputFormat}; + use crate::{ + repository::{cat::display_object, revision, revision::resolve::BlobFormat}, + OutputFormat, + }; pub fn resolve( mut repo: gix::Repository, diff --git a/gitoxide-core/src/repository/status.rs b/gitoxide-core/src/repository/status.rs index 9804dfa214c..77d94322e35 100644 --- a/gitoxide-core/src/repository/status.rs +++ b/gitoxide-core/src/repository/status.rs @@ -1,8 +1,11 @@ +use std::path::Path; + use anyhow::bail; -use gix::bstr::{BStr, BString, ByteSlice}; -use gix::status::{self, index_worktree}; +use gix::{ + bstr::{BStr, BString, ByteSlice}, + status::{self, index_worktree}, +}; use gix_status::index_as_worktree::{Change, Conflict, EntryStatus}; -use std::path::Path; use crate::OutputFormat; diff --git a/gitoxide-core/src/repository/tree.rs b/gitoxide-core/src/repository/tree.rs index fcde83f8fb1..b57e72022b9 100644 --- a/gitoxide-core/src/repository/tree.rs +++ b/gitoxide-core/src/repository/tree.rs @@ -1,17 +1,18 @@ +use std::{borrow::Cow, io, io::BufWriter}; + use anyhow::bail; use gix::Tree; -use std::io::BufWriter; -use std::{borrow::Cow, io}; use crate::OutputFormat; mod entries { + use std::collections::VecDeque; + use gix::{ bstr::{BStr, BString, ByteSlice, ByteVec}, objs::tree::EntryRef, traverse::tree::visit::Action, }; - use std::collections::VecDeque; use crate::repository::tree::format_entry; diff --git a/gitoxide-core/src/repository/worktree.rs b/gitoxide-core/src/repository/worktree.rs index 9eea9ec662e..e3a373eb80c 100644 --- a/gitoxide-core/src/repository/worktree.rs +++ b/gitoxide-core/src/repository/worktree.rs @@ -1,6 +1,7 @@ -use crate::OutputFormat; use anyhow::bail; +use crate::OutputFormat; + pub fn list(repo: gix::Repository, out: &mut dyn std::io::Write, format: OutputFormat) -> anyhow::Result<()> { if format != OutputFormat::Human { bail!("JSON output isn't implemented yet"); diff --git a/gix-actor/CHANGELOG.md b/gix-actor/CHANGELOG.md index 451b71ed37e..bb69a18f7cf 100644 --- a/gix-actor/CHANGELOG.md +++ b/gix-actor/CHANGELOG.md @@ -5,6 +5,95 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.35.1 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.35.0 (2025-04-25) + + + +### Bug Fixes + + - Make email with spaces roundtrip. + We see this situation in commits in the wild. + +### Other + + - inform about untrimmed name and email + +### Bug Fixes (BREAKING) + + - turn `SignatureRef::time` field into `&str`. + We also add a `gix_date::Time::to_str()` method, along with related utilities, + to be able to turn a parsed time back into a raw buffer conveniently. + + Further, remove `Time::to_bstring()` in favor of a `Display` implementation. + - Make `SignatureRef::to_owned()` fallible. + The contained `time` field is now a string, which has to be parsed into + a time for conversion to an owned type. + Additionally, replace `From for Signature` with `TryFrom`. + - Make Signature roundtrip + By storing the raw bytes from Git instead of parsing them into a + `gix_date::Time` from the start, we are able to roundtrip between Git + and gix-actor even with creatively formatted Git data. + + Also add a test case that shows a time offset seen in the wild which + would have failed to round-trip without this change. + +### Commit Statistics + + + + - 19 commits contributed to the release. + - 5 commits were understood as [conventional](https://www.conventionalcommits.org). + - 1 unique issue was worked on: [#1438](https://github.com/GitoxideLabs/gitoxide/issues/1438) + +### Commit Details + + + +
view details + + * **[#1438](https://github.com/GitoxideLabs/gitoxide/issues/1438)** + - Bring back test-case to show how trailing slashes are handled ([`39e35a3`](https://github.com/GitoxideLabs/gitoxide/commit/39e35a30453f8860bb115a254c25a83b85cfd820)) + * **Uncategorized** + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Adapt to changes in `gix-date` ([`8c00e6f`](https://github.com/GitoxideLabs/gitoxide/commit/8c00e6f1d199ed2993fbf8e0a925c67fee854ae5)) + - Adapt to changes in `gix-date` and `gix-actor` ([`afdf1a5`](https://github.com/GitoxideLabs/gitoxide/commit/afdf1a5d5c9fb2645f481c17f580ad59d14d6095)) + - Turn `SignatureRef::time` field into `&str`. ([`57366d3`](https://github.com/GitoxideLabs/gitoxide/commit/57366d3ebd622af8927bb0e199ab8a3c0eafee99)) + - Make `SignatureRef::to_owned()` fallible. ([`545edf5`](https://github.com/GitoxideLabs/gitoxide/commit/545edf5c167d71586a049dc3a2ef2bede7e9d66c)) + - Apply feedback from discussion ([`70097c0`](https://github.com/GitoxideLabs/gitoxide/commit/70097c0feb481541ed96358842de96d6b1af24a9)) + - Make Signature roundtrip ([`9825354`](https://github.com/GitoxideLabs/gitoxide/commit/9825354f85e8e3d2ccdb23ff88c0976dbf094828)) + - Merge pull request #1968 from GitoxideLabs/dependabot/cargo/cargo-bd18780e40 ([`46227e6`](https://github.com/GitoxideLabs/gitoxide/commit/46227e6d1ddc0879662730e5bb21a8597716b1ca)) + - Bump the cargo group with 40 updates ([`06bf1e1`](https://github.com/GitoxideLabs/gitoxide/commit/06bf1e1552de65ce692911bdc4c501d487bbc3d7)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1922 from pierrechevalier83/make_email_with_spaces_roundtrip ([`c13a403`](https://github.com/GitoxideLabs/gitoxide/commit/c13a403e8f306430220c209b1024d408c3c0a4f8)) + - Inform about untrimmed name and email ([`b2bccbc`](https://github.com/GitoxideLabs/gitoxide/commit/b2bccbc4d2ebb085a7958a0d077d65946369210d)) + - Make email with spaces roundtrip. ([`a20b3d0`](https://github.com/GitoxideLabs/gitoxide/commit/a20b3d053b43d4613127e36994f181868cafb730)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.34.0 (2025-04-04) A maintenance release without user-facing changes. @@ -13,7 +102,7 @@ A maintenance release without user-facing changes. - - 8 commits contributed to the release. + - 9 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -24,6 +113,7 @@ A maintenance release without user-facing changes.
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1907 from EliahKagan/run-ci/raw ([`7b17da6`](https://github.com/GitoxideLabs/gitoxide/commit/7b17da6ca1dce275de0d32d0b0d6c238621e6ee3)) - Use raw literals for more strings with backslashes ([`01bd76d`](https://github.com/GitoxideLabs/gitoxide/commit/01bd76dcacb69d9c21f2fc6063e273a01aebf94f)) diff --git a/gix-actor/Cargo.toml b/gix-actor/Cargo.toml index 4a5b13fc2cb..a3ab91b734b 100644 --- a/gix-actor/Cargo.toml +++ b/gix-actor/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-actor" -version = "0.34.0" +version = "0.35.1" description = "A way to identify git actors" authors = ["Sebastian Thiel "] repository = "https://github.com/GitoxideLabs/gitoxide" @@ -19,15 +19,15 @@ doctest = false serde = ["dep:serde", "bstr/serde", "gix-date/serde"] [dependencies] -gix-date = { version = "^0.9.4", path = "../gix-date" } -gix-utils = { version = "^0.2.0", path = "../gix-utils" } +gix-date = { version = "^0.10.1", path = "../gix-date" } +gix-utils = { version = "^0.3.0", path = "../gix-utils" } thiserror = "2.0.0" -bstr = { version = "1.3.0", default-features = false, features = [ +bstr = { version = "1.12.0", default-features = false, features = [ "std", "unicode", ] } -winnow = { version = "0.7.0", features = ["simd"] } +winnow = { version = "0.7.7", features = ["simd"] } itoa = "1.0.1" serde = { version = "1.0.114", optional = true, default-features = false, features = [ "derive", diff --git a/gix-actor/src/lib.rs b/gix-actor/src/lib.rs index e582541cb1a..e5f7ac87cd0 100644 --- a/gix-actor/src/lib.rs +++ b/gix-actor/src/lib.rs @@ -6,8 +6,7 @@ doc = ::document_features::document_features!() )] #![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))] -#![deny(missing_docs, rust_2018_idioms)] -#![forbid(unsafe_code)] +#![deny(missing_docs, rust_2018_idioms, unsafe_code)] /// The re-exported `bstr` crate. /// @@ -18,7 +17,6 @@ use bstr::{BStr, BString}; /// /// For convenience to allow using `gix-date` without adding it to own cargo manifest. pub use gix_date as date; -use gix_date::Time; mod identity; /// @@ -28,9 +26,13 @@ pub mod signature; #[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Identity { - /// The actors name. + /// The actors name, potentially with whitespace as parsed. + /// + /// Use [IdentityRef::trim()] or trim manually to be able to clean it up. pub name: BString, - /// The actor's email. + /// The actor's email, potentially with whitespace and garbage as parsed. + /// + /// Use [IdentityRef::trim()] or trim manually to be able to clean it up. pub email: BString, } @@ -38,38 +40,50 @@ pub struct Identity { #[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct IdentityRef<'a> { - /// The actors name. + /// The actors name, potentially with whitespace as parsed. + /// + /// Use [IdentityRef::trim()] or trim manually to be able to clean it up. #[cfg_attr(feature = "serde", serde(borrow))] pub name: &'a BStr, - /// The actor's email. + /// The actor's email, potentially with whitespace and garbage as parsed. + /// + /// Use [IdentityRef::trim()] or trim manually to be able to clean it up. pub email: &'a BStr, } -/// A mutable signature is created by an actor at a certain time. +/// A mutable signature that is created by an actor at a certain time. /// /// Note that this is not a cryptographical signature. #[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Signature { - /// The actors name. + /// The actors name, potentially with whitespace as parsed. + /// + /// Use [SignatureRef::trim()] or trim manually to be able to clean it up. pub name: BString, - /// The actor's email. + /// The actor's email, potentially with whitespace and garbage as parsed. + /// + /// Use [SignatureRef::trim()] or trim manually to be able to clean it up. pub email: BString, /// The time stamp at which the signature is performed. - pub time: Time, + pub time: date::Time, } -/// A immutable signature is created by an actor at a certain time. +/// An immutable signature that is created by an actor at a certain time. /// /// Note that this is not a cryptographical signature. #[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct SignatureRef<'a> { - /// The actor's name. + /// The actors name, potentially with whitespace as parsed. + /// + /// Use [SignatureRef::trim()] or trim manually to be able to clean it up. #[cfg_attr(feature = "serde", serde(borrow))] pub name: &'a BStr, - /// The actor's email. + /// The actor's email, potentially with whitespace and garbage as parsed. + /// + /// Use [SignatureRef::trim()] or trim manually to be able to clean it up. pub email: &'a BStr, - /// The time stamp at which the signature was performed. - pub time: gix_date::Time, + /// The timestamp at which the signature was performed. + pub time: &'a str, } diff --git a/gix-actor/src/signature/decode.rs b/gix-actor/src/signature/decode.rs index dc07accbfdb..87f5680c3ba 100644 --- a/gix-actor/src/signature/decode.rs +++ b/gix-actor/src/signature/decode.rs @@ -1,19 +1,14 @@ pub(crate) mod function { - use crate::{IdentityRef, SignatureRef}; use bstr::ByteSlice; - use gix_date::{time::Sign, OffsetInSeconds, SecondsSinceUnixEpoch, Time}; - use gix_utils::btoi::to_signed; - use winnow::error::ErrMode; - use winnow::stream::Stream; use winnow::{ - combinator::{alt, opt, separated_pair, terminated}, - error::{AddContext, ParserError, StrContext}, + combinator::{opt, separated_pair}, + error::{AddContext, ErrMode, ParserError, StrContext}, prelude::*, - stream::AsChar, - token::{take, take_until, take_while}, + stream::{AsChar, Stream}, + token::take_while, }; - const SPACE: &[u8] = b" "; + use crate::{IdentityRef, SignatureRef}; /// Parse a signature from the bytes input `i` using `nom`. pub fn decode<'a, E: ParserError<&'a [u8]> + AddContext<&'a [u8], StrContext>>( @@ -23,36 +18,17 @@ pub(crate) mod function { identity, opt(b" "), opt(( - terminated(take_until(0.., SPACE), take(1usize)) - .verify_map(|v| to_signed::(v).ok()) - .context(StrContext::Expected("".into())), - alt(( - take_while(1.., b'-').map(|_| Sign::Minus), - take_while(1.., b'+').map(|_| Sign::Plus), - )) - .context(StrContext::Expected("+|-".into())), - take_while(2, AsChar::is_dec_digit) - .verify_map(|v| to_signed::(v).ok()) - .context(StrContext::Expected("HH".into())), - take_while(1..=2, AsChar::is_dec_digit) - .verify_map(|v| to_signed::(v).ok()) - .context(StrContext::Expected("MM".into())), - take_while(0.., AsChar::is_dec_digit).map(|v: &[u8]| v), + take_while(0.., |b: u8| b == b'+' || b == b'-' || b.is_space() || b.is_dec_digit()).map(|v: &[u8]| v), )) - .map(|maybe_timestamp| { - if let Some((time, sign, hours, minutes, trailing_digits)) = maybe_timestamp { - let offset = if trailing_digits.is_empty() { - (hours * 3600 + minutes * 60) * if sign == Sign::Minus { -1 } else { 1 } - } else { - 0 - }; - Time { - seconds: time, - offset, - sign, + .map(|maybe_bytes| { + if let Some((bytes,)) = maybe_bytes { + // SAFETY: The parser validated that there are only ASCII characters. + #[allow(unsafe_code)] + unsafe { + std::str::from_utf8_unchecked(bytes) } } else { - Time::new(0, 0) + "" } }), ) @@ -79,11 +55,7 @@ pub(crate) mod function { StrContext::Label("Closing '>' not found"), )))?; let i_name_and_email = &i[..right_delim_idx]; - let skip_from_right = i_name_and_email - .iter() - .rev() - .take_while(|b| b.is_ascii_whitespace() || **b == b'>') - .count(); + let skip_from_right = i_name_and_email.iter().rev().take_while(|b| **b == b'>').count(); let left_delim_idx = i_name_and_email .find_byte(b'<') .ok_or(ErrMode::Cut(E::from_input(i).add_context( @@ -91,10 +63,7 @@ pub(crate) mod function { &start, StrContext::Label("Opening '<' not found"), )))?; - let skip_from_left = i[left_delim_idx..] - .iter() - .take_while(|b| b.is_ascii_whitespace() || **b == b'<') - .count(); + let skip_from_left = i[left_delim_idx..].iter().take_while(|b| **b == b'<').count(); let mut name = i[..left_delim_idx].as_bstr(); name = name.strip_suffix(b" ").unwrap_or(name).as_bstr(); @@ -115,12 +84,10 @@ pub use function::identity; #[cfg(test)] mod tests { mod parse_signature { - use bstr::ByteSlice; - use gix_date::{time::Sign, OffsetInSeconds, SecondsSinceUnixEpoch}; use gix_testtools::to_bstr_err; use winnow::prelude::*; - use crate::{signature, SignatureRef, Time}; + use crate::{signature, SignatureRef}; fn decode<'i>( i: &mut &'i [u8], @@ -128,39 +95,53 @@ mod tests { signature::decode.parse_next(i) } - fn signature( - name: &'static str, - email: &'static str, - seconds: SecondsSinceUnixEpoch, - sign: Sign, - offset: OffsetInSeconds, - ) -> SignatureRef<'static> { + fn signature(name: &'static str, email: &'static str, time: &'static str) -> SignatureRef<'static> { SignatureRef { - name: name.as_bytes().as_bstr(), - email: email.as_bytes().as_bstr(), - time: Time { seconds, offset, sign }, + name: name.into(), + email: email.into(), + time, } } #[test] fn tz_minus() { + let actual = decode + .parse_peek(b"Sebastian Thiel 1528473343 -0230") + .expect("parse to work") + .1; + assert_eq!( + actual, + signature("Sebastian Thiel", "byronimo@gmail.com", "1528473343 -0230") + ); + assert_eq!(actual.seconds(), 1528473343); + assert_eq!( + actual.time().expect("valid"), + gix_date::Time { + seconds: 1528473343, + offset: -9000, + } + ); + } + + #[test] + fn tz_plus() { assert_eq!( decode - .parse_peek(b"Sebastian Thiel 1528473343 -0230") + .parse_peek(b"Sebastian Thiel 1528473343 +0230") .expect("parse to work") .1, - signature("Sebastian Thiel", "byronimo@gmail.com", 1528473343, Sign::Minus, -9000) + signature("Sebastian Thiel", "byronimo@gmail.com", "1528473343 +0230") ); } #[test] - fn tz_plus() { + fn email_with_space() { assert_eq!( decode - .parse_peek(b"Sebastian Thiel 1528473343 +0230") + .parse_peek(b"Sebastian Thiel <\tbyronimo@gmail.com > 1528473343 +0230") .expect("parse to work") .1, - signature("Sebastian Thiel", "byronimo@gmail.com", 1528473343, Sign::Plus, 9000) + signature("Sebastian Thiel", "\tbyronimo@gmail.com ", "1528473343 +0230") ); } @@ -171,7 +152,7 @@ mod tests { .parse_peek(b"Sebastian Thiel 1528473343 -0000") .expect("parse to work") .1, - signature("Sebastian Thiel", "byronimo@gmail.com", 1528473343, Sign::Minus, 0) + signature("Sebastian Thiel", "byronimo@gmail.com", "1528473343 -0000") ); } @@ -182,7 +163,7 @@ mod tests { .parse_peek(b"name 1288373970 --700") .expect("parse to work") .1, - signature("name", "name@example.com", 1288373970, Sign::Minus, -252000) + signature("name", "name@example.com", "1288373970 --700") ); } @@ -190,7 +171,7 @@ mod tests { fn empty_name_and_email() { assert_eq!( decode.parse_peek(b" <> 12345 -1215").expect("parse to work").1, - signature("", "", 12345, Sign::Minus, -44100) + signature("", "", "12345 -1215") ); } @@ -209,7 +190,7 @@ mod tests { fn invalid_time() { assert_eq!( decode.parse_peek(b"hello <> abc -1215").expect("parse to work").1, - signature("hello", "", 0, Sign::Plus, 0) + signature("hello", "", "") ); } } diff --git a/gix-actor/src/signature/mod.rs b/gix-actor/src/signature/mod.rs index 9a9a0510a6c..f7f7b331e43 100644 --- a/gix-actor/src/signature/mod.rs +++ b/gix-actor/src/signature/mod.rs @@ -4,6 +4,7 @@ mod _ref { use crate::{signature::decode, IdentityRef, Signature, SignatureRef}; + /// Lifecycle impl<'a> SignatureRef<'a> { /// Deserialize a signature from the given `data`. pub fn from_bytes(mut data: &'a [u8]) -> Result, winnow::error::ErrMode> @@ -14,67 +15,85 @@ mod _ref { } /// Create an owned instance from this shared one. - pub fn to_owned(&self) -> Signature { - Signature { + pub fn to_owned(&self) -> Result { + Ok(Signature { name: self.name.to_owned(), email: self.email.to_owned(), - time: self.time, - } + time: self.time()?, + }) } + } - /// Trim whitespace surrounding the name and email and return a new signature. + /// Access + impl<'a> SignatureRef<'a> { + /// Trim the whitespace surrounding the `name`, `email` and `time` and return a new signature. pub fn trim(&self) -> SignatureRef<'a> { SignatureRef { name: self.name.trim().as_bstr(), email: self.email.trim().as_bstr(), - time: self.time, + time: self.time.trim(), } } - /// Return the actor's name and email, effectively excluding the time stamp of this signature. + /// Return the actor's name and email, effectively excluding the timestamp of this signature. pub fn actor(&self) -> IdentityRef<'a> { IdentityRef { name: self.name, email: self.email, } } + + /// Parse only the seconds since unix epoch from the `time` field, or silently default to 0 + /// if parsing fails. Note that this ignores the timezone, so it can parse otherwise broken dates. + /// + /// For a fallible and more complete, but slower version, use [`time()`](Self::time). + pub fn seconds(&self) -> gix_date::SecondsSinceUnixEpoch { + self.time + .trim() + .split(' ') + .next() + .and_then(|i| i.parse().ok()) + .unwrap_or_default() + } + + /// Parse the `time` field for access to the passed time since unix epoch, and the time offset. + /// The format is expected to be [raw](gix_date::parse_header()). + pub fn time(&self) -> Result { + self.time.parse() + } } } mod convert { + use gix_date::parse::TimeBuf; + use crate::{Signature, SignatureRef}; impl Signature { - /// Borrow this instance as immutable - pub fn to_ref(&self) -> SignatureRef<'_> { + /// Borrow this instance as immutable, serializing the `time` field into `buf`. + pub fn to_ref<'a>(&'a self, time_buf: &'a mut TimeBuf) -> SignatureRef<'a> { SignatureRef { name: self.name.as_ref(), email: self.email.as_ref(), - time: self.time, + time: self.time.to_str(time_buf), } } } impl From> for Signature { fn from(other: SignatureRef<'_>) -> Signature { - let SignatureRef { name, email, time } = other; Signature { - name: name.to_owned(), - email: email.to_owned(), - time, + name: other.name.to_owned(), + email: other.email.to_owned(), + time: other.time().unwrap_or_default(), } } } - - impl<'a> From<&'a Signature> for SignatureRef<'a> { - fn from(other: &'a Signature) -> SignatureRef<'a> { - other.to_ref() - } - } } pub(crate) mod write { use bstr::{BStr, ByteSlice}; + use gix_date::parse::TimeBuf; use crate::{Signature, SignatureRef}; @@ -96,11 +115,12 @@ pub(crate) mod write { impl Signature { /// Serialize this instance to `out` in the git serialization format for actors. pub fn write_to(&self, out: &mut dyn std::io::Write) -> std::io::Result<()> { - self.to_ref().write_to(out) + let mut buf = TimeBuf::default(); + self.to_ref(&mut buf).write_to(out) } /// Computes the number of bytes necessary to serialize this signature pub fn size(&self) -> usize { - self.to_ref().size() + self.name.len() + 2 /* space <*/ + self.email.len() + 2 /* > space */ + self.time.size() } } @@ -112,11 +132,11 @@ pub(crate) mod write { out.write_all(b"<")?; out.write_all(validated_token(self.email)?)?; out.write_all(b"> ")?; - self.time.write_to(out) + out.write_all(validated_token(self.time.into())?) } /// Computes the number of bytes necessary to serialize this signature pub fn size(&self) -> usize { - self.name.len() + 2 /* space <*/ + self.email.len() + 2 /* > space */ + self.time.size() + self.name.len() + 2 /* space <*/ + self.email.len() + 2 /* > space */ + self.time.len() } } diff --git a/gix-actor/tests/identity/mod.rs b/gix-actor/tests/identity/mod.rs index 72d9421bd84..d3787d9a732 100644 --- a/gix-actor/tests/identity/mod.rs +++ b/gix-actor/tests/identity/mod.rs @@ -5,6 +5,9 @@ use gix_actor::Identity; fn round_trip() -> gix_testtools::Result { static DEFAULTS: &[&[u8]] = &[ b"Sebastian Thiel ", + b"Sebastian Thiel < byronimo@gmail.com>", + b"Sebastian Thiel ", + b"Sebastian Thiel <\tbyronimo@gmail.com \t >", ".. ☺️Sebastian 王知明 Thiel🙌 .. ".as_bytes(), b".. whitespace \t is explicitly allowed - unicode aware trimming must be done elsewhere " ]; @@ -19,15 +22,21 @@ fn round_trip() -> gix_testtools::Result { #[test] fn lenient_parsing() -> gix_testtools::Result { - for input in [ - "First Last<> >", - "First Last>\n", + for (input, expected_email) in [ + ( + "First Last<> >", + "fl > ", + ), + ( + "First Last>\n", + "fl (input.as_bytes()).unwrap(); assert_eq!(identity.name, "First Last"); assert_eq!( - identity.email, "fl .example.com".into(), - time: default_time(), + time: Time::default(), }; assert_eq!( format!("{:?}", signature.write_to(&mut Vec::new())), @@ -34,21 +34,13 @@ mod write_to { let signature = Signature { name: "hello\nnewline".into(), email: "name@example.com".into(), - time: default_time(), + time: Time::default(), }; assert_eq!( format!("{:?}", signature.write_to(&mut Vec::new())), "Err(Custom { kind: Other, error: IllegalCharacter })" ); } - - fn default_time() -> Time { - Time { - seconds: 0, - offset: 0, - sign: Sign::Plus, - } - } } } @@ -81,6 +73,16 @@ fn round_trip() -> Result<(), Box> { Ok(()) } +#[test] +fn signature_ref_round_trips_with_seconds_in_offset() -> Result<(), Box> { + let input = b"Sebastian Thiel 1313584730 +051800"; // Seen in the wild + let signature: SignatureRef = gix_actor::SignatureRef::from_bytes::<()>(input).unwrap(); + let mut output = Vec::new(); + signature.write_to(&mut output)?; + assert_eq!(output.as_bstr(), input.as_bstr()); + Ok(()) +} + #[test] fn parse_timestamp_with_trailing_digits() { let signature = gix_actor::SignatureRef::from_bytes::<()>(b"first last 1312735823 +051800") @@ -90,7 +92,7 @@ fn parse_timestamp_with_trailing_digits() { SignatureRef { name: "first last".into(), email: "name@example.com".into(), - time: gix_actor::date::Time::new(1312735823, 0), + time: "1312735823 +051800", } ); @@ -101,7 +103,7 @@ fn parse_timestamp_with_trailing_digits() { SignatureRef { name: "first last".into(), email: "name@example.com".into(), - time: gix_actor::date::Time::new(1312735823, 19080), + time: "1312735823 +0518", } ); } @@ -115,7 +117,7 @@ fn parse_missing_timestamp() { SignatureRef { name: "first last".into(), email: "name@example.com".into(), - time: gix_actor::date::Time::new(0, 0), + time: "" } ); } diff --git a/gix-archive/CHANGELOG.md b/gix-archive/CHANGELOG.md index f5e771d4731..11d10b41bc7 100644 --- a/gix-archive/CHANGELOG.md +++ b/gix-archive/CHANGELOG.md @@ -5,6 +5,58 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.21.1 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.21.0 (2025-04-25) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 11 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1968 from GitoxideLabs/dependabot/cargo/cargo-bd18780e40 ([`46227e6`](https://github.com/GitoxideLabs/gitoxide/commit/46227e6d1ddc0879662730e5bb21a8597716b1ca)) + - Bump the cargo group with 40 updates ([`06bf1e1`](https://github.com/GitoxideLabs/gitoxide/commit/06bf1e1552de65ce692911bdc4c501d487bbc3d7)) + - Merge pull request #1963 from joshtriplett/zlib-rs-default ([`9e075b9`](https://github.com/GitoxideLabs/gitoxide/commit/9e075b99ffc79173d4052d7550fd1d2826c5ec71)) + - Switch to zlib-rs by default and drop other zlib backends ([`96164c5`](https://github.com/GitoxideLabs/gitoxide/commit/96164c5936032b4edb973828178cc55793dd57cc)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.20.0 (2025-04-04) @@ -33,7 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 8 commits contributed to the release. + - 9 commits contributed to the release. - 2 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -44,6 +96,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1873 from NobodyXu/zlib-rs ([`316f113`](https://github.com/GitoxideLabs/gitoxide/commit/316f11322f156760a0e344a3bda33e11ca4e8862)) - Add new feature zlib-rs ([`8b1b55c`](https://github.com/GitoxideLabs/gitoxide/commit/8b1b55c337e65071156856771daee3cbcead1e24)) diff --git a/gix-archive/Cargo.toml b/gix-archive/Cargo.toml index b69f0310835..29b84399e65 100644 --- a/gix-archive/Cargo.toml +++ b/gix-archive/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-archive" -version = "0.20.0" +version = "0.21.1" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "archive generation from of a worktree stream" @@ -23,23 +23,22 @@ tar = ["dep:tar", "dep:gix-path"] tar_gz = ["tar", "dep:flate2"] ## Enable the `zip` archive format. -zip = ["dep:zip"] +## This also enables the `flate2` dependency in order to enable `zlib-rs` on it. +zip = ["dep:flate2", "dep:zip"] [dependencies] -gix-worktree-stream = { version = "^0.20.0", path = "../gix-worktree-stream" } -gix-object = { version = "^0.48.0", path = "../gix-object" } -gix-path = { version = "^0.10.15", path = "../gix-path", optional = true } -gix-date = { version = "^0.9.4", path = "../gix-date" } - -flate2 = { version = "1.0.33", optional = true } -zip = { version = "2.3.0", optional = true, default-features = false, features = [ - "deflate", -] } -jiff = { version = "0.2.0", default-features = false, features = ["std"] } +gix-worktree-stream = { version = "^0.21.1", path = "../gix-worktree-stream" } +gix-object = { version = "^0.49.1", path = "../gix-object" } +gix-path = { version = "^0.10.18", path = "../gix-path", optional = true } +gix-date = { version = "^0.10.2", path = "../gix-date" } + +flate2 = { version = "1.1.1", optional = true, default-features = false, features = ["zlib-rs"] } +zip = { version = "2.6.1", optional = true, default-features = false, features = ["deflate"] } +jiff = { version = "0.2.12", default-features = false, features = ["std"] } thiserror = "2.0.0" -bstr = { version = "1.5.0", default-features = false } +bstr = { version = "1.12.0", default-features = false } tar = { version = "0.4.38", optional = true } diff --git a/gix-attributes/CHANGELOG.md b/gix-attributes/CHANGELOG.md index e281c4c58ec..4620837b6cf 100644 --- a/gix-attributes/CHANGELOG.md +++ b/gix-attributes/CHANGELOG.md @@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.26.0 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.25.1 (2025-04-25) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 10 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Update more changelogs ([`614b389`](https://github.com/GitoxideLabs/gitoxide/commit/614b389c9eea58af2e82cc7b9942c4367e7ad461)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.25.0 (2025-04-04) A maintenance release without user-facing changes. @@ -13,7 +64,7 @@ A maintenance release without user-facing changes. - - 9 commits contributed to the release. + - 10 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -30,6 +81,7 @@ A maintenance release without user-facing changes.
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1908 from EliahKagan/run-ci/scripts ([`c8c42b4`](https://github.com/GitoxideLabs/gitoxide/commit/c8c42b4b86e8bf7d8f0f7130d2da98dfed246be9)) - Fix a few ShellCheck warnings and stylistic inconsistencies ([`e5e2c6f`](https://github.com/GitoxideLabs/gitoxide/commit/e5e2c6fbf9337219edb79ce97b56b3be91bc14e5)) diff --git a/gix-attributes/Cargo.toml b/gix-attributes/Cargo.toml index 3cce82c9d0b..506ad97e738 100644 --- a/gix-attributes/Cargo.toml +++ b/gix-attributes/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-attributes" -version = "0.25.0" +version = "0.26.0" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project dealing .gitattributes files" @@ -19,13 +19,13 @@ doctest = false serde = ["dep:serde", "bstr/serde", "gix-glob/serde", "kstring/serde"] [dependencies] -gix-path = { version = "^0.10.15", path = "../gix-path" } -gix-quote = { version = "^0.5.0", path = "../gix-quote" } -gix-glob = { version = "^0.19.0", path = "../gix-glob" } +gix-path = { version = "^0.10.18", path = "../gix-path" } +gix-quote = { version = "^0.6.0", path = "../gix-quote" } +gix-glob = { version = "^0.20.0", path = "../gix-glob" } gix-trace = { version = "^0.1.12", path = "../gix-trace" } -bstr = { version = "1.3.0", default-features = false, features = ["std", "unicode"] } -smallvec = "1.10.0" +bstr = { version = "1.12.0", default-features = false, features = ["std", "unicode"] } +smallvec = "1.15.0" kstring = "2.0.0" unicode-bom = { version = "2.0.3" } thiserror = "2.0.0" diff --git a/gix-attributes/src/name.rs b/gix-attributes/src/name.rs index c8d50743a1e..6ca70248a1c 100644 --- a/gix-attributes/src/name.rs +++ b/gix-attributes/src/name.rs @@ -1,7 +1,8 @@ -use crate::{Name, NameRef}; use bstr::{BStr, BString, ByteSlice}; use kstring::KStringRef; +use crate::{Name, NameRef}; + impl NameRef<'_> { /// Turn this ref into its owned counterpart. pub fn to_owned(self) -> Name { diff --git a/gix-attributes/src/parse.rs b/gix-attributes/src/parse.rs index 600c7c1191e..6bbf9bf23c4 100644 --- a/gix-attributes/src/parse.rs +++ b/gix-attributes/src/parse.rs @@ -1,9 +1,10 @@ use std::borrow::Cow; -use crate::{name, AssignmentRef, Name, NameRef, StateRef}; use bstr::{BStr, ByteSlice}; use kstring::KStringRef; +use crate::{name, AssignmentRef, Name, NameRef, StateRef}; + /// The kind of attribute that was parsed. #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/gix-attributes/src/search/mod.rs b/gix-attributes/src/search/mod.rs index db17f01fe36..83c6d41929c 100644 --- a/gix-attributes/src/search/mod.rs +++ b/gix-attributes/src/search/mod.rs @@ -1,6 +1,7 @@ +use std::collections::HashMap; + use kstring::KString; use smallvec::SmallVec; -use std::collections::HashMap; use crate::{Assignment, AssignmentRef}; diff --git a/gix-attributes/src/state.rs b/gix-attributes/src/state.rs index 21e51faedf1..c3ff5e35a0b 100644 --- a/gix-attributes/src/state.rs +++ b/gix-attributes/src/state.rs @@ -1,6 +1,7 @@ -use crate::{State, StateRef}; use bstr::{BStr, BString, ByteSlice}; +use crate::{State, StateRef}; + /// A container to encapsulate a tightly packed and typically unallocated byte value that isn't necessarily UTF8 encoded. #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/gix-attributes/tests/parse/mod.rs b/gix-attributes/tests/parse/mod.rs index 75000826327..0092b38928c 100644 --- a/gix-attributes/tests/parse/mod.rs +++ b/gix-attributes/tests/parse/mod.rs @@ -1,6 +1,5 @@ use bstr::BString; -use gix_attributes::state::ValueRef; -use gix_attributes::{parse, StateRef}; +use gix_attributes::{parse, state::ValueRef, StateRef}; use gix_glob::pattern::Mode; use gix_testtools::fixture_bytes; diff --git a/gix-blame/CHANGELOG.md b/gix-blame/CHANGELOG.md index 0ef3d470db4..f7ee9927de9 100644 --- a/gix-blame/CHANGELOG.md +++ b/gix-blame/CHANGELOG.md @@ -5,6 +5,63 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.2.1 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.2.0 (2025-04-25) + +### Bug Fixes + + - Adapt to changes in gix-actor + Use the committer date and author date that are now backed by bytes and + interpret these bytes into a `gix_date::Time` on demand. + +### Commit Statistics + + + + - 12 commits contributed to the release. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Adapt to changes in gix-actor ([`b07f907`](https://github.com/GitoxideLabs/gitoxide/commit/b07f907ba2e01849744c72df35dac57b624f2f85)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Merge pull request #1945 from cruessler/replace-btreemap-by-smallvec ([`c75bc44`](https://github.com/GitoxideLabs/gitoxide/commit/c75bc44b4f9d3b1c8d48b9dfc42c94576088b8a6)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Replace BTreeMap by SmallVec ([`75b842b`](https://github.com/GitoxideLabs/gitoxide/commit/75b842b13cc4a17acfd3419263aa1520df10fb01)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## v0.1.0 (2025-04-04) @@ -59,7 +116,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 19 commits contributed to the release. + - 20 commits contributed to the release. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -76,6 +133,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1910 from cruessler/add-tree-id-to-either ([`544cdaf`](https://github.com/GitoxideLabs/gitoxide/commit/544cdafbb58bb3e39bf19a19eb02d5296a7361aa)) - Make use `gix_traverse::commit::Either::tree_id()` ([`3fad860`](https://github.com/GitoxideLabs/gitoxide/commit/3fad860aaffb53fd27b6d2b959ad8a8d1ab9ac63)) diff --git a/gix-blame/Cargo.toml b/gix-blame/Cargo.toml index 42392624009..22298622e83 100644 --- a/gix-blame/Cargo.toml +++ b/gix-blame/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-blame" -version = "0.1.0" +version = "0.2.1" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project dedicated to implementing a 'blame' algorithm" @@ -10,21 +10,18 @@ authors = ["Christoph Rüßler ", "Sebastian Thi edition = "2021" rust-version = "1.70" -[lib] -doctest = false - [dependencies] -gix-commitgraph = { version = "^0.27.0", path = "../gix-commitgraph" } -gix-revwalk = { version = "^0.19.0", path = "../gix-revwalk" } +gix-commitgraph = { version = "^0.28.0", path = "../gix-commitgraph" } +gix-revwalk = { version = "^0.20.1", path = "../gix-revwalk" } gix-trace = { version = "^0.1.12", path = "../gix-trace" } -gix-date = { version = "^0.9.4", path = "../gix-date" } -gix-diff = { version = "^0.51.0", path = "../gix-diff", default-features = false, features = ["blob"] } -gix-object = { version = "^0.48.0", path = "../gix-object" } -gix-hash = { version = "^0.17.0", path = "../gix-hash" } -gix-worktree = { version = "^0.40.0", path = "../gix-worktree", default-features = false, features = ["attributes"] } -gix-traverse = { version = "^0.45.0", path = "../gix-traverse" } +gix-date = { version = "^0.10.2", path = "../gix-date" } +gix-diff = { version = "^0.52.1", path = "../gix-diff", default-features = false, features = ["blob"] } +gix-object = { version = "^0.49.1", path = "../gix-object" } +gix-hash = { version = "^0.18.0", path = "../gix-hash" } +gix-worktree = { version = "^0.41.0", path = "../gix-worktree", default-features = false, features = ["attributes"] } +gix-traverse = { version = "^0.46.2", path = "../gix-traverse" } -smallvec = "1.10.0" +smallvec = "1.15.0" thiserror = "2.0.0" [dev-dependencies] @@ -34,3 +31,4 @@ gix-fs = { path = "../gix-fs" } gix-index = { path = "../gix-index" } gix-odb = { path = "../gix-odb" } gix-testtools = { path = "../tests/tools" } +pretty_assertions = "1.4.0" diff --git a/gix-blame/src/file/function.rs b/gix-blame/src/file/function.rs index d9299689c21..03429b61b12 100644 --- a/gix-blame/src/file/function.rs +++ b/gix-blame/src/file/function.rs @@ -1,7 +1,6 @@ -use super::{process_changes, Change, UnblamedHunk}; -use crate::{BlameEntry, Error, Options, Outcome, Statistics}; -use gix_diff::blob::intern::TokenSource; -use gix_diff::tree::Visit; +use std::{num::NonZeroU32, ops::Range}; + +use gix_diff::{blob::intern::TokenSource, tree::Visit}; use gix_hash::ObjectId; use gix_object::{ bstr::{BStr, BString}, @@ -9,8 +8,9 @@ use gix_object::{ }; use gix_traverse::commit::find as find_commit; use smallvec::SmallVec; -use std::num::NonZeroU32; -use std::ops::Range; + +use super::{process_changes, Change, UnblamedHunk}; +use crate::{BlameEntry, Error, Options, Outcome, Statistics}; /// Produce a list of consecutive [`BlameEntry`] instances to indicate in which commits the ranges of the file /// at `suspect:` originated in. @@ -37,7 +37,8 @@ use std::ops::Range; /// /// *For brevity, `HEAD` denotes the starting point of the blame operation. It could be any commit, or even commits that /// represent the worktree state. -/// We begin with a single *Unblamed Hunk* and a single suspect, usually the `HEAD` commit as the commit containing the +/// +/// We begin with one or more *Unblamed Hunks* and a single suspect, usually the `HEAD` commit as the commit containing the /// *Blamed File*, so that it contains the entire file, with the first commit being a candidate for the entire *Blamed File*. /// We traverse the commit graph starting at the first suspect, and see if there have been changes to `file_path`. /// If so, we have found a *Source File* and a *Suspect* commit, and have hunks that represent these changes. @@ -94,16 +95,21 @@ pub fn file( return Ok(Outcome::default()); } - let range_in_blamed_file = one_based_inclusive_to_zero_based_exclusive_range(options.range, num_lines_in_blamed)?; - let mut hunks_to_blame = vec![UnblamedHunk { - range_in_blamed_file: range_in_blamed_file.clone(), - suspects: [(suspect, range_in_blamed_file)].into(), - }]; + let ranges = options.range.to_zero_based_exclusive(num_lines_in_blamed)?; + let mut hunks_to_blame = Vec::with_capacity(ranges.len()); + + for range in ranges { + hunks_to_blame.push(UnblamedHunk { + range_in_blamed_file: range.clone(), + suspects: [(suspect, range)].into(), + }); + } let (mut buf, mut buf2) = (Vec::new(), Vec::new()); let commit = find_commit(cache.as_ref(), &odb, &suspect, &mut buf)?; - let mut queue: gix_revwalk::PriorityQueue = gix_revwalk::PriorityQueue::new(); - queue.insert(commit_time(commit)?, suspect); + let mut queue: gix_revwalk::PriorityQueue = + gix_revwalk::PriorityQueue::new(); + queue.insert(commit.commit_time()?, suspect); let mut out = Vec::new(); let mut diff_state = gix_diff::tree::State::default(); @@ -114,7 +120,7 @@ pub fn file( break; } - let is_still_suspect = hunks_to_blame.iter().any(|hunk| hunk.suspects.contains_key(&suspect)); + let is_still_suspect = hunks_to_blame.iter().any(|hunk| hunk.has_suspect(&suspect)); if !is_still_suspect { // There are no `UnblamedHunk`s associated with this `suspect`, so we can continue with // the next one. @@ -122,7 +128,7 @@ pub fn file( } let commit = find_commit(cache.as_ref(), &odb, &suspect, &mut buf)?; - let commit_time = commit_time(commit)?; + let commit_time = commit.commit_time()?; if let Some(since) = options.since { if commit_time < since.seconds { @@ -189,18 +195,19 @@ pub fn file( .collect(); for hunk in hunks_to_blame.iter() { - if let Some(range_in_suspect) = hunk.suspects.get(&suspect) { + if let Some(range_in_suspect) = hunk.get_range(&suspect) { let range_in_blamed_file = hunk.range_in_blamed_file.clone(); - for (blamed_line_number, source_line_number) in range_in_blamed_file.zip(range_in_suspect.clone()) { - let source_token = source_lines_as_tokens[source_line_number as usize]; - let blame_token = blamed_lines_as_tokens[blamed_line_number as usize]; - - let source_line = BString::new(source_interner[source_token].into()); - let blamed_line = BString::new(blamed_interner[blame_token].into()); + let source_lines = range_in_suspect + .clone() + .map(|i| BString::new(source_interner[source_lines_as_tokens[i as usize]].into())) + .collect::>(); + let blamed_lines = range_in_blamed_file + .clone() + .map(|i| BString::new(blamed_interner[blamed_lines_as_tokens[i as usize]].into())) + .collect::>(); - assert_eq!(source_line, blamed_line); - } + assert_eq!(source_lines, blamed_lines); } } } @@ -297,33 +304,6 @@ pub fn file( unblamed_hunk.remove_blame(suspect); true }); - - // This block asserts that line ranges for each suspect never overlap. If they did overlap - // this would mean that the same line in a *Source File* would map to more than one line in - // the *Blamed File* and this is not possible. - #[cfg(debug_assertions)] - { - let ranges = hunks_to_blame.iter().fold( - std::collections::BTreeMap::>>::new(), - |mut acc, hunk| { - for (suspect, range) in hunk.suspects.clone() { - acc.entry(suspect).or_default().push(range); - } - - acc - }, - ); - - for (_, mut ranges) in ranges { - ranges.sort_by(|a, b| a.start.cmp(&b.start)); - - for window in ranges.windows(2) { - if let [a, b] = window { - assert!(a.end <= b.start, "#{hunks_to_blame:#?}"); - } - } - } - } } debug_assert_eq!( @@ -342,25 +322,6 @@ pub fn file( }) } -/// This function assumes that `range` has 1-based inclusive line numbers and converts it to the -/// format internally used: 0-based line numbers stored in ranges that are exclusive at the -/// end. -fn one_based_inclusive_to_zero_based_exclusive_range( - range: Option>, - max_lines: u32, -) -> Result, Error> { - let Some(range) = range else { return Ok(0..max_lines) }; - if range.start == 0 { - return Err(Error::InvalidLineRange); - } - let start = range.start - 1; - let end = range.end; - if start >= max_lines || end > max_lines || start == end { - return Err(Error::InvalidLineRange); - } - Ok(start..end) -} - /// Pass ownership of each unblamed hunk of `from` to `to`. /// /// This happens when `from` didn't actually change anything in the blamed file. @@ -415,7 +376,6 @@ fn coalesce_blame_entries(lines_blamed: Vec) -> Vec { // As of 2024-09-19, the check below only is in `git`, but not in `libgit2`. && previous_source_range.end == current_source_range.start { - // let combined_range = let coalesced_entry = BlameEntry { start_in_blamed_file: previous_blamed_range.start as u32, start_in_source_file: previous_source_range.start as u32, @@ -499,8 +459,7 @@ fn tree_diff_at_file_path( } fn visit(&mut self, change: gix_diff::tree::visit::Change) -> gix_diff::tree::visit::Action { - use gix_diff::tree::visit; - use gix_diff::tree::visit::Change::*; + use gix_diff::tree::{visit, visit::Change::*}; if self.inner.path() == self.interesting_path { self.change = Some(match change { @@ -667,17 +626,6 @@ fn find_path_entry_in_commit( Ok(res.map(|e| e.oid)) } -type CommitTime = i64; - -fn commit_time(commit: gix_traverse::commit::Either<'_, '_>) -> Result { - match commit { - gix_traverse::commit::Either::CommitRefIter(commit_ref_iter) => { - commit_ref_iter.committer().map(|c| c.time.seconds) - } - gix_traverse::commit::Either::CachedCommit(commit) => Ok(commit.committer_timestamp() as i64), - } -} - type ParentIds = SmallVec<[(gix_hash::ObjectId, i64); 2]>; fn collect_parents( @@ -701,7 +649,7 @@ fn collect_parents( for id in commit_ref_iter.parent_ids() { let parent = odb.find_commit_iter(id.as_ref(), buf).ok(); let parent_commit_time = parent - .and_then(|parent| parent.committer().ok().map(|committer| committer.time.seconds)) + .and_then(|parent| parent.committer().ok().map(|committer| committer.seconds())) .unwrap_or_default(); parent_ids.push((id, parent_commit_time)); } diff --git a/gix-blame/src/file/mod.rs b/gix-blame/src/file/mod.rs index 668be563533..935fb09eed8 100644 --- a/gix-blame/src/file/mod.rs +++ b/gix-blame/src/file/mod.rs @@ -1,20 +1,19 @@ //! A module with low-level types and functions. -use std::num::NonZeroU32; -use std::ops::Range; +use std::{num::NonZeroU32, ops::Range}; use gix_hash::ObjectId; -use crate::types::{BlameEntry, Either, LineRange}; -use crate::types::{Change, Offset, UnblamedHunk}; +use crate::types::{BlameEntry, Change, Either, LineRange, Offset, UnblamedHunk}; pub(super) mod function; -/// Compare a section from the *Blamed File* (`hunk`) with a change from a diff and see if there -/// is an intersection with `change`. Based on that intersection, we may generate a [`BlameEntry`] for `out` -/// and/or split the `hunk` into multiple. +/// Compare a section from a potential *Source File* (`hunk`) with a change from a diff and see if +/// there is an intersection with `change`. Based on that intersection, we may generate a +/// [`BlameEntry`] for `out` and/or split the `hunk` into multiple. /// -/// This is the core of the blame implementation as it matches regions in *Source File* to the *Blamed File*. +/// This is the core of the blame implementation as it matches regions in *Blamed File* to +/// corresponding regions in one or more than one *Source File*. fn process_change( new_hunks_to_blame: &mut Vec, offset: &mut Offset, @@ -39,7 +38,7 @@ fn process_change( // 3. `change` *must* be returned if it is not fully included in `hunk`. match (hunk, change) { (Some(hunk), Some(Change::Unchanged(unchanged))) => { - let Some(range_in_suspect) = hunk.suspects.get(&suspect) else { + let Some(range_in_suspect) = hunk.get_range(&suspect) else { // We don’t clone blame to `parent` as `suspect` has nothing to do with this // `hunk`. new_hunks_to_blame.push(hunk); @@ -102,7 +101,7 @@ fn process_change( } } (Some(hunk), Some(Change::AddedOrReplaced(added, number_of_lines_deleted))) => { - let Some(range_in_suspect) = hunk.suspects.get(&suspect).cloned() else { + let Some(range_in_suspect) = hunk.get_range(&suspect).cloned() else { new_hunks_to_blame.push(hunk); return (None, Some(Change::AddedOrReplaced(added, number_of_lines_deleted))); }; @@ -247,7 +246,7 @@ fn process_change( } } (Some(hunk), Some(Change::Deleted(line_number_in_destination, number_of_lines_deleted))) => { - let Some(range_in_suspect) = hunk.suspects.get(&suspect) else { + let Some(range_in_suspect) = hunk.get_range(&suspect) else { new_hunks_to_blame.push(hunk); return ( None, @@ -322,36 +321,41 @@ fn process_change( /// Consume `hunks_to_blame` and `changes` to pair up matches ranges (also overlapping) with each other. /// Once a match is found, it's pushed onto `out`. +/// +/// `process_changes` assumes that ranges coming from the same *Source File* can and do +/// occasionally overlap. If it were a desirable property of the blame algorithm as a whole to +/// never have two different lines from a *Blamed File* mapped to the same line in a *Source File*, +/// this property would need to be enforced at a higher level than `process_changes`. +/// Then the nested loops could potentially be flattened into one. fn process_changes( hunks_to_blame: Vec, changes: Vec, suspect: ObjectId, parent: ObjectId, ) -> Vec { - let mut hunks_iter = hunks_to_blame.into_iter(); - let mut changes_iter = changes.into_iter(); + let mut new_hunks_to_blame = Vec::new(); - let mut hunk = hunks_iter.next(); - let mut change = changes_iter.next(); + for mut hunk in hunks_to_blame.into_iter().map(Some) { + let mut offset_in_destination = Offset::Added(0); - let mut new_hunks_to_blame = Vec::new(); - let mut offset_in_destination = Offset::Added(0); - - loop { - (hunk, change) = process_change( - &mut new_hunks_to_blame, - &mut offset_in_destination, - suspect, - parent, - hunk, - change, - ); - - hunk = hunk.or_else(|| hunks_iter.next()); - change = change.or_else(|| changes_iter.next()); - - if hunk.is_none() && change.is_none() { - break; + let mut changes_iter = changes.iter().cloned(); + let mut change = changes_iter.next(); + + loop { + (hunk, change) = process_change( + &mut new_hunks_to_blame, + &mut offset_in_destination, + suspect, + parent, + hunk, + change, + ); + + change = change.or_else(|| changes_iter.next()); + + if hunk.is_none() { + break; + } } } new_hunks_to_blame @@ -359,12 +363,14 @@ fn process_changes( impl UnblamedHunk { fn shift_by(mut self, suspect: ObjectId, offset: Offset) -> Self { - self.suspects.entry(suspect).and_modify(|e| *e = e.shift_by(offset)); + if let Some(entry) = self.suspects.iter_mut().find(|entry| entry.0 == suspect) { + entry.1 = entry.1.shift_by(offset); + } self } fn split_at(self, suspect: ObjectId, line_number_in_destination: u32) -> Either { - match self.suspects.get(&suspect) { + match self.get_range(&suspect) { None => Either::Left(self), Some(range_in_suspect) => { if !range_in_suspect.contains(&line_number_in_destination) { @@ -405,34 +411,34 @@ impl UnblamedHunk { /// This is like [`Self::pass_blame()`], but easier to use in places where the 'passing' is /// done 'inline'. fn passed_blame(mut self, from: ObjectId, to: ObjectId) -> Self { - if let Some(range_in_suspect) = self.suspects.remove(&from) { - self.suspects.insert(to, range_in_suspect); + if let Some(entry) = self.suspects.iter_mut().find(|entry| entry.0 == from) { + entry.0 = to; } self } /// Transfer all ranges from the commit at `from` to the commit at `to`. fn pass_blame(&mut self, from: ObjectId, to: ObjectId) { - if let Some(range_in_suspect) = self.suspects.remove(&from) { - self.suspects.insert(to, range_in_suspect); + if let Some(entry) = self.suspects.iter_mut().find(|entry| entry.0 == from) { + entry.0 = to; } } fn clone_blame(&mut self, from: ObjectId, to: ObjectId) { - if let Some(range_in_suspect) = self.suspects.get(&from) { - self.suspects.insert(to, range_in_suspect.clone()); + if let Some(range_in_suspect) = self.get_range(&from) { + self.suspects.push((to, range_in_suspect.clone())); } } fn remove_blame(&mut self, suspect: ObjectId) { - self.suspects.remove(&suspect); + self.suspects.retain(|entry| entry.0 != suspect); } } impl BlameEntry { /// Create an offset from a portion of the *Blamed File*. fn from_unblamed_hunk(unblamed_hunk: &UnblamedHunk, commit_id: ObjectId) -> Option { - let range_in_source_file = unblamed_hunk.suspects.get(&commit_id)?; + let range_in_source_file = unblamed_hunk.get_range(&commit_id)?; Some(Self { start_in_blamed_file: unblamed_hunk.range_in_blamed_file.start, diff --git a/gix-blame/src/file/tests.rs b/gix-blame/src/file/tests.rs index 1366fcfea9c..9185ca50633 100644 --- a/gix-blame/src/file/tests.rs +++ b/gix-blame/src/file/tests.rs @@ -1,7 +1,9 @@ -use crate::file::{Offset, UnblamedHunk}; -use gix_hash::ObjectId; use std::ops::Range; +use gix_hash::ObjectId; + +use crate::file::{Offset, UnblamedHunk}; + fn new_unblamed_hunk(range_in_blamed_file: Range, suspect: ObjectId, offset: Offset) -> UnblamedHunk { assert!( range_in_blamed_file.end > range_in_blamed_file.start, @@ -957,8 +959,13 @@ mod process_change { } mod process_changes { - use crate::file::tests::{new_unblamed_hunk, one_sha, zero_sha}; - use crate::file::{process_changes, Change, Offset, UnblamedHunk}; + use pretty_assertions::assert_eq; + + use crate::file::{ + process_changes, + tests::{new_unblamed_hunk, one_sha, zero_sha}, + Change, Offset, UnblamedHunk, + }; #[test] fn nothing() { @@ -1332,4 +1339,38 @@ mod process_changes { ] ); } + + #[test] + fn subsequent_hunks_overlapping_end_of_addition() { + let suspect = zero_sha(); + let parent = one_sha(); + let hunks_to_blame = vec![ + new_unblamed_hunk(13..16, suspect, Offset::Added(0)), + new_unblamed_hunk(10..17, suspect, Offset::Added(0)), + ]; + let changes = vec![Change::AddedOrReplaced(10..14, 0)]; + let new_hunks_to_blame = process_changes(hunks_to_blame, changes, suspect, parent); + + assert_eq!( + new_hunks_to_blame, + [ + UnblamedHunk { + range_in_blamed_file: 13..14, + suspects: [(suspect, 13..14)].into() + }, + UnblamedHunk { + range_in_blamed_file: 14..16, + suspects: [(parent, 10..12)].into(), + }, + UnblamedHunk { + range_in_blamed_file: 10..14, + suspects: [(suspect, 10..14)].into(), + }, + UnblamedHunk { + range_in_blamed_file: 14..17, + suspects: [(parent, 10..13)].into(), + }, + ] + ); + } } diff --git a/gix-blame/src/lib.rs b/gix-blame/src/lib.rs index d2c7a5243d7..e811ab88ddb 100644 --- a/gix-blame/src/lib.rs +++ b/gix-blame/src/lib.rs @@ -2,22 +2,22 @@ //! //! ### Terminology //! -//! * **Source File** +//! * **Blamed File** //! - The file as it exists in `HEAD`. //! - the initial state with all lines that we need to associate with a *Source File*. -//! * **Blamed File** -//! - A file at a version (i.e. commit) that introduces hunks into the final 'image'. +//! * **Source File** +//! - A file at a version (i.e., commit) that introduces hunks into the final 'image' of the *Blamed File*. //! * **Suspects** //! - The versions of the files that can contain hunks that we could use in the final 'image' //! - multiple at the same time as the commit-graph may split up. -//! - turns into *Source File* once we have found an association into the *Blamed File*. +//! - They turn into a *Source File* once we have found an association into the *Blamed File*. #![deny(rust_2018_idioms, missing_docs)] #![forbid(unsafe_code)] mod error; pub use error::Error; mod types; -pub use types::{BlameEntry, Options, Outcome, Statistics}; +pub use types::{BlameEntry, BlameRanges, Options, Outcome, Statistics}; mod file; pub use file::function::file; diff --git a/gix-blame/src/types.rs b/gix-blame/src/types.rs index 9f5bc7a528c..84b107b6f8d 100644 --- a/gix-blame/src/types.rs +++ b/gix-blame/src/types.rs @@ -1,21 +1,150 @@ -use crate::file::function::tokens_for_diffing; use gix_hash::ObjectId; use gix_object::bstr::BString; -use std::num::NonZeroU32; +use smallvec::SmallVec; +use std::ops::RangeInclusive; use std::{ - collections::BTreeMap, + num::NonZeroU32, ops::{AddAssign, Range, SubAssign}, }; +use crate::file::function::tokens_for_diffing; +use crate::Error; + +/// A type to represent one or more line ranges to blame in a file. +/// +/// It handles the conversion between git's 1-based inclusive ranges and the internal +/// 0-based exclusive ranges used by the blame algorithm. +/// +/// # Examples +/// +/// ```rust +/// use gix_blame::BlameRanges; +/// +/// // Blame lines 20 through 40 (inclusive) +/// let range = BlameRanges::from_range(20..=40); +/// +/// // Blame multiple ranges +/// let mut ranges = BlameRanges::new(); +/// ranges.add_range(1..=4); // Lines 1-4 +/// ranges.add_range(10..=14); // Lines 10-14 +/// ``` +/// +/// # Line Number Representation +/// +/// This type uses 1-based inclusive ranges to mirror `git`'s behaviour: +/// - A range of `20..=40` represents 21 lines, spanning from line 20 up to and including line 40 +/// - This will be converted to `19..40` internally as the algorithm uses 0-based ranges that are exclusive at the end +/// +/// # Empty Ranges +/// +/// An empty `BlameRanges` (created via `BlameRanges::new()` or `BlameRanges::default()`) means +/// to blame the entire file, similar to running `git blame` without line number arguments. +#[derive(Debug, Clone, Default)] +pub struct BlameRanges { + /// The ranges to blame, stored as 1-based inclusive ranges + /// An empty Vec means blame the entire file + ranges: Vec>, +} + +/// Lifecycle +impl BlameRanges { + /// Create a new empty BlameRanges instance. + /// + /// An empty instance means to blame the entire file. + pub fn new() -> Self { + Self::default() + } + + /// Create from a single range. + /// + /// The range is 1-based, similar to git's line number format. + pub fn from_range(range: RangeInclusive) -> Self { + Self { ranges: vec![range] } + } + + /// Create from multiple ranges. + /// + /// All ranges are 1-based. + /// Overlapping or adjacent ranges will be merged. + pub fn from_ranges(ranges: Vec>) -> Self { + let mut result = Self::new(); + for range in ranges { + result.merge_range(range); + } + result + } +} + +impl BlameRanges { + /// Add a single range to blame. + /// + /// The range should be 1-based inclusive. + /// If the new range overlaps with or is adjacent to an existing range, + /// they will be merged into a single range. + pub fn add_range(&mut self, new_range: RangeInclusive) { + self.merge_range(new_range); + } + + /// Attempts to merge the new range with any existing ranges. + /// If no merge is possible, add it as a new range. + fn merge_range(&mut self, new_range: RangeInclusive) { + // Check if this range can be merged with any existing range + for range in &mut self.ranges { + // Check if ranges overlap or are adjacent + if new_range.start() <= range.end() && range.start() <= new_range.end() { + *range = *range.start().min(new_range.start())..=*range.end().max(new_range.end()); + return; + } + } + // If no overlap found, add it as a new range + self.ranges.push(new_range); + } + + /// Convert the 1-based inclusive ranges to 0-based exclusive ranges. + /// + /// This is used internally by the blame algorithm to convert from git's line number format + /// to the internal format used for processing. + /// + /// # Errors + /// + /// Returns `Error::InvalidLineRange` if: + /// - Any range starts at 0 (must be 1-based) + /// - Any range extends beyond the file's length + /// - Any range has the same start and end + pub fn to_zero_based_exclusive(&self, max_lines: u32) -> Result>, Error> { + if self.ranges.is_empty() { + let range = 0..max_lines; + return Ok(vec![range]); + } + + let mut result = Vec::with_capacity(self.ranges.len()); + for range in &self.ranges { + if *range.start() == 0 { + return Err(Error::InvalidLineRange); + } + let start = range.start() - 1; + let end = *range.end(); + if start >= max_lines || end > max_lines || start == end { + return Err(Error::InvalidLineRange); + } + result.push(start..end); + } + Ok(result) + } + + /// Returns true if no specific ranges are set (meaning blame entire file) + pub fn is_empty(&self) -> bool { + self.ranges.is_empty() + } +} + /// Options to be passed to [`file()`](crate::file()). #[derive(Default, Debug, Clone)] pub struct Options { /// The algorithm to use for diffing. pub diff_algorithm: gix_diff::blob::Algorithm, - /// A 1-based inclusive range, in order to mirror `git`’s behaviour. `Some(20..40)` represents - /// 21 lines, spanning from line 20 up to and including line 40. This will be converted to - /// `19..40` internally as the algorithm uses 0-based ranges that are exclusive at the end. - pub range: Option>, + /// The ranges to blame in the file. + pub range: BlameRanges, /// Don't consider commits before the given date. pub since: Option, } @@ -198,8 +327,23 @@ impl LineRange for Range { pub struct UnblamedHunk { /// The range in the file that is being blamed that this hunk represents. pub range_in_blamed_file: Range, - /// Maps a commit to the range in a source file (i.e. *Blamed File* at a revision) that is equal to `range_in_blamed_file`. - pub suspects: BTreeMap>, + /// Maps a commit to the range in a source file (i.e. *Blamed File* at a revision) that is + /// equal to `range_in_blamed_file`. Since `suspects` rarely contains more than 1 item, it can + /// efficiently be stored as a `SmallVec`. + pub suspects: SmallVec<[(ObjectId, Range); 1]>, +} + +impl UnblamedHunk { + pub(crate) fn has_suspect(&self, suspect: &ObjectId) -> bool { + self.suspects.iter().any(|entry| entry.0 == *suspect) + } + + pub(crate) fn get_range(&self, suspect: &ObjectId) -> Option<&Range> { + self.suspects + .iter() + .find(|entry| entry.0 == *suspect) + .map(|entry| &entry.1) + } } #[derive(Debug)] @@ -209,7 +353,10 @@ pub(crate) enum Either { } /// A single change between two blobs, or an unchanged region. -#[derive(Debug, PartialEq)] +/// +/// Line numbers refer to the file that is referred to as `after` or `NewOrDestination`, depending +/// on the context. +#[derive(Clone, Debug, PartialEq)] pub enum Change { /// A range of tokens that wasn't changed. Unchanged(Range), diff --git a/gix-blame/tests/blame.rs b/gix-blame/tests/blame.rs index 2956d59b933..99e5105f6df 100644 --- a/gix-blame/tests/blame.rs +++ b/gix-blame/tests/blame.rs @@ -1,5 +1,6 @@ use std::path::PathBuf; +use gix_blame::BlameRanges; use gix_hash::ObjectId; use gix_object::bstr; @@ -193,7 +194,7 @@ macro_rules! mktest { format!("{}.txt", $case).as_str().into(), gix_blame::Options { diff_algorithm: gix_diff::blob::Algorithm::Histogram, - range: None, + range: BlameRanges::default(), since: None, }, )? @@ -264,7 +265,7 @@ fn diff_disparity() { format!("{case}.txt").as_str().into(), gix_blame::Options { diff_algorithm: gix_diff::blob::Algorithm::Histogram, - range: None, + range: BlameRanges::default(), since: None, }, ) @@ -281,7 +282,7 @@ fn diff_disparity() { } #[test] -fn line_range() { +fn since() { let Fixture { odb, mut resource_cache, @@ -296,50 +297,124 @@ fn line_range() { "simple.txt".into(), gix_blame::Options { diff_algorithm: gix_diff::blob::Algorithm::Histogram, - range: Some(1..2), - since: None, + range: BlameRanges::default(), + since: Some(gix_date::parse("2025-01-31", None).unwrap()), }, ) .unwrap() .entries; - assert_eq!(lines_blamed.len(), 2); + assert_eq!(lines_blamed.len(), 1); let git_dir = fixture_path().join(".git"); - let baseline = Baseline::collect(git_dir.join("simple-lines-1-2.baseline")).unwrap(); + let baseline = Baseline::collect(git_dir.join("simple-since.baseline")).unwrap(); assert_eq!(lines_blamed, baseline); } -#[test] -fn since() { - let Fixture { - odb, - mut resource_cache, - suspect, - } = Fixture::new().unwrap(); +mod blame_ranges { + use crate::{fixture_path, Baseline, Fixture}; + use gix_blame::BlameRanges; - let lines_blamed = gix_blame::file( - &odb, - suspect, - None, - &mut resource_cache, - "simple.txt".into(), - gix_blame::Options { - diff_algorithm: gix_diff::blob::Algorithm::Histogram, - range: None, - since: Some(gix_date::parse("2025-01-31", None).unwrap()), - }, - ) - .unwrap() - .entries; + #[test] + fn line_range() { + let Fixture { + odb, + mut resource_cache, + suspect, + } = Fixture::new().unwrap(); - assert_eq!(lines_blamed.len(), 1); + let lines_blamed = gix_blame::file( + &odb, + suspect, + None, + &mut resource_cache, + "simple.txt".into(), + gix_blame::Options { + diff_algorithm: gix_diff::blob::Algorithm::Histogram, + range: BlameRanges::from_range(1..=2), + since: None, + }, + ) + .unwrap() + .entries; - let git_dir = fixture_path().join(".git"); - let baseline = Baseline::collect(git_dir.join("simple-since.baseline")).unwrap(); + assert_eq!(lines_blamed.len(), 2); - assert_eq!(lines_blamed, baseline); + let git_dir = fixture_path().join(".git"); + let baseline = Baseline::collect(git_dir.join("simple-lines-1-2.baseline")).unwrap(); + + assert_eq!(lines_blamed, baseline); + } + + #[test] + fn multiple_ranges_using_add_range() { + let Fixture { + odb, + mut resource_cache, + suspect, + } = Fixture::new().unwrap(); + + let mut ranges = BlameRanges::new(); + ranges.add_range(1..=2); // Lines 1-2 + ranges.add_range(1..=1); // Duplicate range, should be ignored + ranges.add_range(4..=4); // Line 4 + + let lines_blamed = gix_blame::file( + &odb, + suspect, + None, + &mut resource_cache, + "simple.txt".into(), + gix_blame::Options { + diff_algorithm: gix_diff::blob::Algorithm::Histogram, + range: ranges, + since: None, + }, + ) + .unwrap() + .entries; + + assert_eq!(lines_blamed.len(), 3); // Should have 3 lines total (2 from first range + 1 from second range) + + let git_dir = fixture_path().join(".git"); + let baseline = Baseline::collect(git_dir.join("simple-lines-multiple-1-2-and-4.baseline")).unwrap(); + + assert_eq!(lines_blamed, baseline); + } + + #[test] + fn multiple_ranges_usingfrom_ranges() { + let Fixture { + odb, + mut resource_cache, + suspect, + } = Fixture::new().unwrap(); + + let ranges = BlameRanges::from_ranges(vec![1..=2, 1..=1, 4..=4]); + + let lines_blamed = gix_blame::file( + &odb, + suspect, + None, + &mut resource_cache, + "simple.txt".into(), + gix_blame::Options { + diff_algorithm: gix_diff::blob::Algorithm::Histogram, + range: ranges, + since: None, + }, + ) + .unwrap() + .entries; + + assert_eq!(lines_blamed.len(), 3); // Should have 3 lines total (2 from first range + 1 from second range) + + let git_dir = fixture_path().join(".git"); + let baseline = Baseline::collect(git_dir.join("simple-lines-multiple-1-2-and-4.baseline")).unwrap(); + + assert_eq!(lines_blamed, baseline); + } } fn fixture_path() -> PathBuf { diff --git a/gix-blame/tests/fixtures/make_blame_repo.sh b/gix-blame/tests/fixtures/make_blame_repo.sh index aa366230fff..fe5ca4f1af0 100755 --- a/gix-blame/tests/fixtures/make_blame_repo.sh +++ b/gix-blame/tests/fixtures/make_blame_repo.sh @@ -227,6 +227,7 @@ git merge branch-that-has-earlier-commit || true git blame --porcelain simple.txt > .git/simple.baseline git blame --porcelain -L 1,2 simple.txt > .git/simple-lines-1-2.baseline +git blame --porcelain -L 1,2 -L 4 simple.txt > .git/simple-lines-multiple-1-2-and-4.baseline git blame --porcelain --since 2025-01-31 simple.txt > .git/simple-since.baseline git blame --porcelain multiline-hunks.txt > .git/multiline-hunks.baseline git blame --porcelain deleted-lines.txt > .git/deleted-lines.baseline diff --git a/gix-command/CHANGELOG.md b/gix-command/CHANGELOG.md index 03f02323a4b..c0070161bed 100644 --- a/gix-command/CHANGELOG.md +++ b/gix-command/CHANGELOG.md @@ -5,6 +5,56 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.6.0 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.5.1 (2025-04-25) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 9 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.5.0 (2025-04-04) @@ -47,7 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 17 commits contributed to the release. + - 18 commits contributed to the release. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#1799](https://github.com/GitoxideLabs/gitoxide/issues/1799) @@ -60,6 +110,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **[#1799](https://github.com/GitoxideLabs/gitoxide/issues/1799)** - Add `Preprae::with_quoted_command()` ([`435984b`](https://github.com/GitoxideLabs/gitoxide/commit/435984bffda225ee923aa2c9fdbbf730d7719f74)) * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1907 from EliahKagan/run-ci/raw ([`7b17da6`](https://github.com/GitoxideLabs/gitoxide/commit/7b17da6ca1dce275de0d32d0b0d6c238621e6ee3)) - Use raw literals for more strings with backslashes ([`01bd76d`](https://github.com/GitoxideLabs/gitoxide/commit/01bd76dcacb69d9c21f2fc6063e273a01aebf94f)) diff --git a/gix-command/Cargo.toml b/gix-command/Cargo.toml index afb89fb8317..40c7c3398e0 100644 --- a/gix-command/Cargo.toml +++ b/gix-command/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-command" -version = "0.5.0" +version = "0.6.0" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project handling internal git command execution" @@ -16,12 +16,12 @@ doctest = false [dependencies] gix-trace = { version = "^0.1.12", path = "../gix-trace" } -gix-path = { version = "^0.10.15", path = "../gix-path" } -gix-quote = { version = "^0.5.0", path = "../gix-quote" } +gix-path = { version = "^0.10.18", path = "../gix-path" } +gix-quote = { version = "^0.6.0", path = "../gix-quote" } -bstr = { version = "1.5.0", default-features = false, features = ["std", "unicode"] } +bstr = { version = "1.12.0", default-features = false, features = ["std", "unicode"] } shell-words = "1.0" [dev-dependencies] gix-testtools = { path = "../tests/tools" } -once_cell = "1.17.1" +once_cell = "1.21.3" diff --git a/gix-command/src/lib.rs b/gix-command/src/lib.rs index 8199d0c186a..a3c428edeba 100644 --- a/gix-command/src/lib.rs +++ b/gix-command/src/lib.rs @@ -2,9 +2,9 @@ #![deny(rust_2018_idioms, missing_docs)] #![forbid(unsafe_code)] -use std::io::Read; use std::{ ffi::OsString, + io::Read, path::{Path, PathBuf}, }; @@ -85,8 +85,8 @@ pub struct Context { } mod prepare { - use std::borrow::Cow; use std::{ + borrow::Cow, ffi::OsString, process::{Command, Stdio}, }; @@ -425,9 +425,9 @@ pub fn extract_interpreter(executable: &Path) -> Option { /// pub mod shebang { + use std::{ffi::OsString, path::PathBuf}; + use bstr::{BStr, ByteSlice}; - use std::ffi::OsString; - use std::path::PathBuf; /// Parse `buf` to extract all shebang information. pub fn parse(buf: &BStr) -> Option { diff --git a/gix-command/tests/command.rs b/gix-command/tests/command.rs index 30b29977563..6ab8775afe9 100644 --- a/gix-command/tests/command.rs +++ b/gix-command/tests/command.rs @@ -1,6 +1,7 @@ -use gix_testtools::Result; use std::path::Path; +use gix_testtools::Result; + #[test] fn extract_interpreter() -> gix_testtools::Result { let root = gix_testtools::scripted_fixture_read_only("win_path_lookup.sh")?; @@ -79,8 +80,9 @@ mod shebang { #[cfg(unix)] { - use bstr::ByteSlice; use std::os::unix::ffi::OsStrExt; + + use bstr::ByteSlice; assert_eq!( shebang::parse(b"#!/bin/sh -x \xC3\x28\x41 -y ".as_bstr()), Some(shebang::Data { diff --git a/gix-commitgraph/CHANGELOG.md b/gix-commitgraph/CHANGELOG.md index 9da6c9e1242..8cf688f71c5 100644 --- a/gix-commitgraph/CHANGELOG.md +++ b/gix-commitgraph/CHANGELOG.md @@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.28.0 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.27.1 (2025-04-25) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 8 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.27.0 (2025-04-04) @@ -39,7 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 13 commits contributed to the release. + - 14 commits contributed to the release. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -56,6 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1915 from emilazy/push-qvyqmopsoltr ([`4660f7a`](https://github.com/GitoxideLabs/gitoxide/commit/4660f7a6f71873311f68f170b0f1f6659a02829d)) - Migrate hashing API users to fallible versions ([`fbf6cc8`](https://github.com/GitoxideLabs/gitoxide/commit/fbf6cc897cfeff5ed2a2d5946c060e0cebbd1afd)) diff --git a/gix-commitgraph/Cargo.toml b/gix-commitgraph/Cargo.toml index 548d83dc6d2..8eff229eef5 100644 --- a/gix-commitgraph/Cargo.toml +++ b/gix-commitgraph/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-commitgraph" -version = "0.27.0" +version = "0.28.0" repository = "https://github.com/GitoxideLabs/gitoxide" documentation = "https://git-scm.com/docs/commit-graph" license = "MIT OR Apache-2.0" @@ -20,10 +20,10 @@ doctest = false serde = ["dep:serde", "gix-hash/serde", "bstr/serde"] [dependencies] -gix-hash = { version = "^0.17.0", path = "../gix-hash" } +gix-hash = { version = "^0.18.0", path = "../gix-hash" } gix-chunk = { version = "^0.4.11", path = "../gix-chunk" } -bstr = { version = "1.3.0", default-features = false, features = ["std"] } +bstr = { version = "1.12.0", default-features = false, features = ["std"] } memmap2 = "0.9.0" serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } thiserror = "2.0.0" diff --git a/gix-commitgraph/src/file/init.rs b/gix-commitgraph/src/file/init.rs index 022cc7b7ea2..07bfdee3642 100644 --- a/gix-commitgraph/src/file/init.rs +++ b/gix-commitgraph/src/file/init.rs @@ -1,5 +1,6 @@ -use std::path::Path; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; + +use bstr::ByteSlice; use crate::{ file::{ @@ -8,7 +9,6 @@ use crate::{ }, File, }; -use bstr::ByteSlice; /// The error used in [`File::at()`]. #[derive(thiserror::Error, Debug)] diff --git a/gix-config-value/CHANGELOG.md b/gix-config-value/CHANGELOG.md index 43a892fe295..58d8e7ca87e 100644 --- a/gix-config-value/CHANGELOG.md +++ b/gix-config-value/CHANGELOG.md @@ -5,6 +5,56 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.15.0 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.14.13 (2025-04-25) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 9 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1895 from EliahKagan/run-ci/s390x ([`705b86d`](https://github.com/GitoxideLabs/gitoxide/commit/705b86d59d6f18e76dcc5278f54b0e4838437d9d)) + - Change `interpolate_user` tests to cover Android ([`35627b5`](https://github.com/GitoxideLabs/gitoxide/commit/35627b5146c6cbf72a41b1ef4cd6b3d64010c0bc)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.14.12 (2025-04-04) A maintenance release without user-facing changes. @@ -13,7 +63,7 @@ A maintenance release without user-facing changes. - - 6 commits contributed to the release. + - 7 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -30,6 +80,7 @@ A maintenance release without user-facing changes.
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1907 from EliahKagan/run-ci/raw ([`7b17da6`](https://github.com/GitoxideLabs/gitoxide/commit/7b17da6ca1dce275de0d32d0b0d6c238621e6ee3)) - Use raw literals for more strings with backslashes ([`01bd76d`](https://github.com/GitoxideLabs/gitoxide/commit/01bd76dcacb69d9c21f2fc6063e273a01aebf94f)) diff --git a/gix-config-value/Cargo.toml b/gix-config-value/Cargo.toml index a864833cdb3..ccccf115e47 100644 --- a/gix-config-value/Cargo.toml +++ b/gix-config-value/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-config-value" -version = "0.14.12" +version = "0.15.0" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project providing git-config value parsing" @@ -19,10 +19,10 @@ doctest = false serde = ["dep:serde", "bstr/serde"] [dependencies] -gix-path = { version = "^0.10.15", path = "../gix-path" } +gix-path = { version = "^0.10.18", path = "../gix-path" } thiserror = "2.0.0" -bstr = { version = "1.0.1", default-features = false, features = ["std"] } +bstr = { version = "1.12.0", default-features = false, features = ["std"] } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } bitflags = "2" diff --git a/gix-config-value/tests/value/path.rs b/gix-config-value/tests/value/path.rs index 94259d6355b..999c07b06f9 100644 --- a/gix-config-value/tests/value/path.rs +++ b/gix-config-value/tests/value/path.rs @@ -89,16 +89,16 @@ mod interpolate { Ok(()) } - #[cfg(windows)] + #[cfg(any(target_os = "windows", target_os = "android"))] #[test] - fn tilde_with_given_user_is_unsupported_on_windows() { + fn tilde_with_given_user_is_unsupported_on_windows_and_android() { assert!(matches!( interpolate_without_context("~baz/foo/bar"), Err(gix_config_value::path::interpolate::Error::UserInterpolationUnsupported) )); } - #[cfg(not(windows))] + #[cfg(not(any(target_os = "windows", target_os = "android")))] #[test] fn tilde_with_given_user() -> crate::Result { let home = std::env::current_dir()?; diff --git a/gix-config/CHANGELOG.md b/gix-config/CHANGELOG.md index 615066aa914..26fb2bcc31c 100644 --- a/gix-config/CHANGELOG.md +++ b/gix-config/CHANGELOG.md @@ -5,6 +5,75 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.45.1 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.45.0 (2025-04-25) + +### New Features + + - add `File::section_ids()` iterator and `file::SectionMut::set_trust()` #(1912) + That way it's easier to make changes to sections in a mutable instance of + Git configuration. + +### Commit Statistics + + + + - 18 commits contributed to the release. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Thanks Clippy + + + +[Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Thanks clippy ([`6f009d7`](https://github.com/GitoxideLabs/gitoxide/commit/6f009d781da9e931d44b113a925a80e77e8788af)) + - Merge pull request #1968 from GitoxideLabs/dependabot/cargo/cargo-bd18780e40 ([`46227e6`](https://github.com/GitoxideLabs/gitoxide/commit/46227e6d1ddc0879662730e5bb21a8597716b1ca)) + - Bump the cargo group with 40 updates ([`06bf1e1`](https://github.com/GitoxideLabs/gitoxide/commit/06bf1e1552de65ce692911bdc4c501d487bbc3d7)) + - Merge pull request #1964 from GitoxideLabs/fix-1912 ([`359914c`](https://github.com/GitoxideLabs/gitoxide/commit/359914ce567d90d2db52b605bc126ad23db7f039)) + - Add `File::section_ids()` iterator and `file::SectionMut::set_trust()` #(1912) ([`aa91f9a`](https://github.com/GitoxideLabs/gitoxide/commit/aa91f9ae4c589efb5b047c1f0d9be7fe49f55ab0)) + - Merge pull request #1957 from EliahKagan/run-ci/versioning ([`5823b22`](https://github.com/GitoxideLabs/gitoxide/commit/5823b22bfcd30123b6859ec9dc62c62ce0737f72)) + - Adapt `Cargo.toml` files in workspace to `gix-features` bump ([`6315536`](https://github.com/GitoxideLabs/gitoxide/commit/63155368cc5074328314f1b3f565e5813df725cf)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1933 from GitoxideLabs/release-gix-features ([`1612c73`](https://github.com/GitoxideLabs/gitoxide/commit/1612c73a16c8d900e1b6ef35b25bd6b3e3f6652a)) + - Release gix-features v0.41.1 ([`fc5faf2`](https://github.com/GitoxideLabs/gitoxide/commit/fc5faf24dfc6d6e1580308ec5e7c12e96e0ccb41)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.44.0 (2025-04-04) ### Bug Fixes @@ -18,7 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 13 commits contributed to the release. + - 15 commits contributed to the release. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#1826](https://github.com/GitoxideLabs/gitoxide/issues/1826) @@ -37,6 +106,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **[#1826](https://github.com/GitoxideLabs/gitoxide/issues/1826)** - Assure that sections can be deleted properly with `File::remove_section_filter()` ([`be80806`](https://github.com/GitoxideLabs/gitoxide/commit/be80806fa990f7992f2c334622cd3e4abb6c36ca)) * **Uncategorized** + - Release gix-sec v0.10.12, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`ada5a94`](https://github.com/GitoxideLabs/gitoxide/commit/ada5a9447dc3c210afbd8866fe939c3f3a024226)) + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1907 from EliahKagan/run-ci/raw ([`7b17da6`](https://github.com/GitoxideLabs/gitoxide/commit/7b17da6ca1dce275de0d32d0b0d6c238621e6ee3)) - Drop trailing `,` just before `)` on same line in function calls ([`66a5ae1`](https://github.com/GitoxideLabs/gitoxide/commit/66a5ae1b586d583066402c801213a55141e2aad6)) @@ -3677,6 +3748,96 @@ This is a maintenance release without functional changes. - `len` - `from_env` - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` + - `len` + - `from_env` + - `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` +- `len` +- `from_env` +- `open` - `len` - `from_env` - `open` @@ -3883,11 +4044,21 @@ This is a maintenance release without functional changes. `ParserFromIoError` +lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen +lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen +lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen +lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen +lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen lenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopenlenfrom_envopen + + + + + ## v0.1.1 (2021-05-09) diff --git a/gix-config/Cargo.toml b/gix-config/Cargo.toml index 28a7a4eb348..48215b20328 100644 --- a/gix-config/Cargo.toml +++ b/gix-config/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-config" -version = "0.44.0" +version = "0.45.1" repository = "https://github.com/GitoxideLabs/gitoxide" description = "A git-config file parser and editor from the gitoxide project" license = "MIT OR Apache-2.0" @@ -19,21 +19,21 @@ autotests = false serde = ["dep:serde", "bstr/serde", "gix-sec/serde", "gix-ref/serde", "gix-glob/serde", "gix-config-value/serde"] [dependencies] -gix-features = { version = "^0.41.0", path = "../gix-features" } -gix-config-value = { version = "^0.14.12", path = "../gix-config-value" } -gix-path = { version = "^0.10.15", path = "../gix-path" } -gix-sec = { version = "^0.10.11", path = "../gix-sec" } -gix-ref = { version = "^0.51.0", path = "../gix-ref" } -gix-glob = { version = "^0.19.0", path = "../gix-glob" } - -winnow = { version = "0.7.0", features = ["simd"] } +gix-features = { version = "^0.42.1", path = "../gix-features" } +gix-config-value = { version = "^0.15.0", path = "../gix-config-value" } +gix-path = { version = "^0.10.18", path = "../gix-path" } +gix-sec = { version = "^0.11.0", path = "../gix-sec" } +gix-ref = { version = "^0.52.1", path = "../gix-ref" } +gix-glob = { version = "^0.20.0", path = "../gix-glob" } + +winnow = { version = "0.7.7", features = ["simd"] } memchr = "2" thiserror = "2.0.0" unicode-bom = { version = "2.0.3" } -bstr = { version = "1.3.0", default-features = false, features = ["std"] } +bstr = { version = "1.12.0", default-features = false, features = ["std"] } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -smallvec = "1.9.0" -once_cell = "1.14.0" +smallvec = "1.15.0" +once_cell = "1.21.3" document-features = { version = "0.2.0", optional = true } diff --git a/gix-config/src/file/access/comfort.rs b/gix-config/src/file/access/comfort.rs index 6a75188d016..44b69cda6f5 100644 --- a/gix-config/src/file/access/comfort.rs +++ b/gix-config/src/file/access/comfort.rs @@ -2,8 +2,7 @@ use std::borrow::Cow; use bstr::BStr; -use crate::file::Metadata; -use crate::{value, AsKey, File}; +use crate::{file::Metadata, value, AsKey, File}; /// Comfortable API for accessing values impl File<'_> { diff --git a/gix-config/src/file/access/mutate.rs b/gix-config/src/file/access/mutate.rs index 3da5f178bf4..167d7c6a2f3 100644 --- a/gix-config/src/file/access/mutate.rs +++ b/gix-config/src/file/access/mutate.rs @@ -3,9 +3,8 @@ use std::borrow::Cow; use bstr::BStr; use gix_features::threading::OwnShared; -use crate::file::Metadata; use crate::{ - file::{self, rename_section, write::ends_with_newline, SectionBodyIdsLut, SectionId, SectionMut}, + file::{self, rename_section, write::ends_with_newline, Metadata, SectionBodyIdsLut, SectionId, SectionMut}, lookup, parse::{section, Event, FrontMatterEvents}, File, diff --git a/gix-config/src/file/access/raw.rs b/gix-config/src/file/access/raw.rs index c2b8c967f7f..4c8f73d4c6d 100644 --- a/gix-config/src/file/access/raw.rs +++ b/gix-config/src/file/access/raw.rs @@ -3,9 +3,8 @@ use std::{borrow::Cow, collections::HashMap}; use bstr::BStr; use smallvec::ToSmallVec; -use crate::file::Metadata; use crate::{ - file::{mutable::multi_value::EntryData, Index, MultiValueMut, Size, ValueMut}, + file::{mutable::multi_value::EntryData, Index, Metadata, MultiValueMut, Size, ValueMut}, lookup, parse::{section, Event}, AsKey, File, diff --git a/gix-config/src/file/access/read_only.rs b/gix-config/src/file/access/read_only.rs index e433bd4d0ae..308b26766d2 100644 --- a/gix-config/src/file/access/read_only.rs +++ b/gix-config/src/file/access/read_only.rs @@ -410,6 +410,11 @@ impl<'event> File<'event> { self.section_order.iter().map(move |id| (&self.sections[id], *id)) } + /// Return an iterator over all section ids, in order of occurrence in the file itself. + pub fn section_ids(&mut self) -> impl Iterator + '_ { + self.section_order.iter().copied() + } + /// Return an iterator over all sections along with non-section events that are placed right after them, /// in order of occurrence in the file itself. /// diff --git a/gix-config/src/file/includes/types.rs b/gix-config/src/file/includes/types.rs index ed55ffe47c3..340d4fdaaf1 100644 --- a/gix-config/src/file/includes/types.rs +++ b/gix-config/src/file/includes/types.rs @@ -1,6 +1,7 @@ -use crate::{parse, path::interpolate}; use std::path::PathBuf; +use crate::{parse, path::interpolate}; + /// The error returned when following includes. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] diff --git a/gix-config/src/file/mutable/section.rs b/gix-config/src/file/mutable/section.rs index 447c8648d67..ec38ab85e2c 100644 --- a/gix-config/src/file/mutable/section.rs +++ b/gix-config/src/file/mutable/section.rs @@ -4,6 +4,7 @@ use std::{ }; use bstr::{BStr, BString, ByteSlice, ByteVec}; +use gix_sec::Trust; use smallvec::SmallVec; use crate::{ @@ -142,6 +143,14 @@ impl<'event> SectionMut<'_, 'event> { } } + /// Set the trust level in the meta-data of this section to `trust`. + pub fn set_trust(&mut self, trust: Trust) -> &mut Self { + let mut meta = (*self.section.meta).clone(); + meta.trust = trust; + self.section.meta = meta.into(); + self + } + /// Removes the latest value by key and returns it, if it exists. pub fn remove(&mut self, value_name: &str) -> Option> { let key = ValueName::from_str_unchecked(value_name); diff --git a/gix-config/src/key.rs b/gix-config/src/key.rs index cba7d92dce9..cdbae4e6dc8 100644 --- a/gix-config/src/key.rs +++ b/gix-config/src/key.rs @@ -1,5 +1,4 @@ -use bstr::BStr; -use bstr::ByteSlice; +use bstr::{BStr, ByteSlice}; /// Parse parts of a Git configuration key, like `remote.origin.url` or `core.bare`. pub trait AsKey { diff --git a/gix-config/src/parse/tests.rs b/gix-config/src/parse/tests.rs index 75c53fb677e..703f8a2167a 100644 --- a/gix-config/src/parse/tests.rs +++ b/gix-config/src/parse/tests.rs @@ -1,9 +1,10 @@ mod section { - use crate::parse::section::Header; - use crate::parse::{section, Comment, Event, Events, Section}; - use bstr::BStr; use std::borrow::Cow; + use bstr::BStr; + + use crate::parse::{section, section::Header, Comment, Event, Events, Section}; + #[test] #[cfg(target_pointer_width = "64")] fn size_of_events() { diff --git a/gix-config/tests/Cargo.toml b/gix-config/tests/Cargo.toml index 59a59cb9e89..c07492bd4b3 100644 --- a/gix-config/tests/Cargo.toml +++ b/gix-config/tests/Cargo.toml @@ -27,7 +27,7 @@ gix-ref = { path = "../../gix-ref" } gix-path = { path = "../../gix-path" } gix-sec = { path = "../../gix-sec" } serial_test = { version = "3.1.0", default-features = false } -bstr = { version = "1.3.0", default-features = false, features = ["std"] } +bstr = { version = "1.12.0", default-features = false, features = ["std"] } -bytesize = "1.3.0" +bytesize = "2.0.1" cap = { version = "0.1.2", features = ["stats"] } diff --git a/gix-config/tests/config/file/init/from_paths/includes/conditional/gitdir/util.rs b/gix-config/tests/config/file/init/from_paths/includes/conditional/gitdir/util.rs index 9e6dbbf4697..b7057d8351b 100644 --- a/gix-config/tests/config/file/init/from_paths/includes/conditional/gitdir/util.rs +++ b/gix-config/tests/config/file/init/from_paths/includes/conditional/gitdir/util.rs @@ -142,8 +142,8 @@ pub fn assert_section_value( Some(Value::Override) => Some(cow_str("override-value")), None => None, }, - "gix-config disagrees with the expected value, {:?} for debugging", - env.tempdir.into_path() + "gix-config disagrees with the expected value, {} for debugging", + env.tempdir.into_path().display() ); assure_git_agrees(expected, env) } @@ -171,9 +171,9 @@ fn assure_git_agrees(expected: Option, env: GitEnv) -> crate::Result { assert_eq!( output.status.success(), expected.is_some(), - "{:?}, {:?} for debugging", + "{:?}, {} for debugging", output, - env.tempdir.into_path() + env.tempdir.into_path().display() ); let git_output: BString = output.stdout.trim_end().into(); assert_eq!( diff --git a/gix-config/tests/config/file/init/from_paths/includes/conditional/hasconfig.rs b/gix-config/tests/config/file/init/from_paths/includes/conditional/hasconfig.rs index 5ed6de7a030..27ab7a7b7c0 100644 --- a/gix-config/tests/config/file/init/from_paths/includes/conditional/hasconfig.rs +++ b/gix-config/tests/config/file/init/from_paths/includes/conditional/hasconfig.rs @@ -1,6 +1,7 @@ -use gix_config::file::{includes, init}; use std::path::{Path, PathBuf}; +use gix_config::file::{includes, init}; + #[test] fn simple() -> crate::Result { let (config, root) = config_with_includes("basic")?; diff --git a/gix-config/tests/config/mod.rs b/gix-config/tests/config/mod.rs index 2782af4095a..93a04387fbf 100644 --- a/gix-config/tests/config/mod.rs +++ b/gix-config/tests/config/mod.rs @@ -1,3 +1,4 @@ +#![allow(clippy::unnecessary_debug_formatting)] pub use gix_testtools::Result; mod file; diff --git a/gix-config/tests/config/source/mod.rs b/gix-config/tests/config/source/mod.rs index 26dc4e093bc..9bc63d14135 100644 --- a/gix-config/tests/config/source/mod.rs +++ b/gix-config/tests/config/source/mod.rs @@ -1,6 +1,7 @@ -use gix_config::Source; use std::path::Path; +use gix_config::Source; + #[test] fn git_config_no_system() { assert_eq!( diff --git a/gix-config/tests/mem.rs b/gix-config/tests/mem.rs index 5c65cb26d6c..7bbde99e22f 100644 --- a/gix-config/tests/mem.rs +++ b/gix-config/tests/mem.rs @@ -1,7 +1,7 @@ +use std::{alloc, time::Instant}; + use bytesize::ByteSize; use cap::Cap; -use std::alloc; -use std::time::Instant; #[global_allocator] static ALLOCATOR: Cap = Cap::new(alloc::System, usize::MAX); diff --git a/gix-credentials/CHANGELOG.md b/gix-credentials/CHANGELOG.md index 1dd8a013def..6df6a675255 100644 --- a/gix-credentials/CHANGELOG.md +++ b/gix-credentials/CHANGELOG.md @@ -5,6 +5,54 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.29.0 (2025-04-26) + +### Commit Statistics + + + + - 1 commit contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) +
+ +## 0.28.1 (2025-04-25) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 7 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0 ([`cc5b696`](https://github.com/GitoxideLabs/gitoxide/commit/cc5b696b7b73277ddcc3ef246714cf80a092cf76)) + - Adjusting changelogs prior to release of gix-path v0.10.16, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.1, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.1, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.1, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.1, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.52.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.1, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.1, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.47.0, gitoxide v0.43.0, safety bump 7 crates ([`49fa9f3`](https://github.com/GitoxideLabs/gitoxide/commit/49fa9f38110ba975d68f5ac3baefeb55f0a0501b)) + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.28.0 (2025-04-04) A maintenance release without user-facing changes. @@ -13,7 +61,7 @@ A maintenance release without user-facing changes. - - 8 commits contributed to the release. + - 10 commits contributed to the release. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -30,6 +78,8 @@ A maintenance release without user-facing changes.
view details * **Uncategorized** + - Release gix-sec v0.10.12, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0 ([`ada5a94`](https://github.com/GitoxideLabs/gitoxide/commit/ada5a9447dc3c210afbd8866fe939c3f3a024226)) + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1862 from EliahKagan/run-ci/consistent-sh ([`0ba3147`](https://github.com/GitoxideLabs/gitoxide/commit/0ba31474968ddbe7f2b2d54a756eeeb8a28fbabf)) - Adjust `gix-credentials` tests for `gix-command` changes ([`b937171`](https://github.com/GitoxideLabs/gitoxide/commit/b9371714b74103c89d3ba9a241a92a1bd989fdad)) diff --git a/gix-credentials/Cargo.toml b/gix-credentials/Cargo.toml index 09cd67a165b..faf3f7491af 100644 --- a/gix-credentials/Cargo.toml +++ b/gix-credentials/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-credentials" -version = "0.28.0" +version = "0.29.0" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project to interact with git credentials helpers" @@ -19,17 +19,17 @@ doctest = false serde = ["dep:serde", "bstr/serde", "gix-sec/serde"] [dependencies] -gix-sec = { version = "^0.10.11", path = "../gix-sec" } -gix-url = { version = "^0.30.0", path = "../gix-url" } -gix-path = { version = "^0.10.15", path = "../gix-path" } -gix-command = { version = "^0.5.0", path = "../gix-command" } -gix-config-value = { version = "^0.14.12", path = "../gix-config-value" } -gix-prompt = { version = "^0.10.0", path = "../gix-prompt" } +gix-sec = { version = "^0.11.0", path = "../gix-sec" } +gix-url = { version = "^0.31.0", path = "../gix-url" } +gix-path = { version = "^0.10.18", path = "../gix-path" } +gix-command = { version = "^0.6.0", path = "../gix-command" } +gix-config-value = { version = "^0.15.0", path = "../gix-config-value" } +gix-prompt = { version = "^0.11.0", path = "../gix-prompt" } gix-trace = { version = "^0.1.12", path = "../gix-trace" } thiserror = "2.0.0" serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -bstr = { version = "1.3.0", default-features = false, features = ["std"] } +bstr = { version = "1.12.0", default-features = false, features = ["std"] } @@ -38,7 +38,7 @@ document-features = { version = "0.2.1", optional = true } [dev-dependencies] gix-testtools = { path = "../tests/tools" } gix-sec = { path = "../gix-sec" } -once_cell = "1.19.0" +once_cell = "1.21.3" [package.metadata.docs.rs] all-features = true diff --git a/gix-date/CHANGELOG.md b/gix-date/CHANGELOG.md index 86592d6898f..816b6b41aba 100644 --- a/gix-date/CHANGELOG.md +++ b/gix-date/CHANGELOG.md @@ -5,6 +5,115 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.10.2 (2025-05-10) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 5 commits contributed to the release over the course of 14 calendar days. + - 14 days passed between releases. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 2 unique issues were worked on: [#1979](https://github.com/GitoxideLabs/gitoxide/issues/1979), [#1984](https://github.com/GitoxideLabs/gitoxide/issues/1984) + +### Commit Details + + + +
view details + + * **[#1979](https://github.com/GitoxideLabs/gitoxide/issues/1979)** + - Reproduce fuzz-failure ([`6bf1be6`](https://github.com/GitoxideLabs/gitoxide/commit/6bf1be67ba93c1b8e467e3c3127438d1eb43897e)) + * **[#1984](https://github.com/GitoxideLabs/gitoxide/issues/1984)** + - Further upgrade `jiff` to fix fuzz failures ([`0be4dd4`](https://github.com/GitoxideLabs/gitoxide/commit/0be4dd4e037e8a3080ef335913e06bc2584fd96d)) + * **Uncategorized** + - Prepare changelogs prior to release of `gix-index` ([`bfc4880`](https://github.com/GitoxideLabs/gitoxide/commit/bfc48801bf3ed39cdf7ec02e01aa3cfb6181705f)) + - Merge pull request #1984 from GitoxideLabs/fuzz ([`f965540`](https://github.com/GitoxideLabs/gitoxide/commit/f965540c162ed3e23bd0d7ad9083093033647e51)) + - Merge pull request #1971 from GitoxideLabs/new-release ([`8d4c4d1`](https://github.com/GitoxideLabs/gitoxide/commit/8d4c4d1e09f84c962c29d98a686c64228196ac13)) +
+ +## 0.10.1 (2025-04-26) + +### Commit Statistics + + + + - 3 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-date v0.10.1, gix-utils v0.3.0, gix-actor v0.35.1, gix-validate v0.10.0, gix-path v0.10.17, gix-features v0.42.1, gix-hash v0.18.0, gix-hashtable v0.8.1, gix-object v0.49.1, gix-glob v0.20.0, gix-quote v0.6.0, gix-attributes v0.26.0, gix-command v0.6.0, gix-packetline-blocking v0.19.0, gix-filter v0.19.1, gix-fs v0.15.0, gix-commitgraph v0.28.0, gix-revwalk v0.20.1, gix-traverse v0.46.1, gix-worktree-stream v0.21.1, gix-archive v0.21.1, gix-tempfile v17.1.0, gix-lock v17.1.0, gix-index v0.40.0, gix-config-value v0.15.0, gix-pathspec v0.11.0, gix-ignore v0.15.0, gix-worktree v0.41.0, gix-diff v0.52.1, gix-blame v0.2.1, gix-ref v0.52.1, gix-sec v0.11.0, gix-config v0.45.1, gix-prompt v0.11.0, gix-url v0.31.0, gix-credentials v0.29.0, gix-discover v0.40.1, gix-dir v0.14.1, gix-mailmap v0.27.1, gix-revision v0.34.1, gix-merge v0.5.1, gix-negotiate v0.20.1, gix-pack v0.59.1, gix-odb v0.69.1, gix-refspec v0.30.1, gix-shallow v0.4.0, gix-packetline v0.19.0, gix-transport v0.47.0, gix-protocol v0.50.1, gix-status v0.19.1, gix-submodule v0.19.1, gix-worktree-state v0.19.0, gix v0.72.1, gix-fsck v0.11.1, gitoxide-core v0.47.1, gitoxide v0.44.0 ([`e104545`](https://github.com/GitoxideLabs/gitoxide/commit/e104545b78951ca882481d4a58f4425a8bc81c87)) + - Bump all prior pratch levels to majors ([`5f7f805`](https://github.com/GitoxideLabs/gitoxide/commit/5f7f80570e1a5522e76ea58cccbb957249a0dffe)) + - Merge pull request #1969 from GitoxideLabs/new-release ([`631f07a`](https://github.com/GitoxideLabs/gitoxide/commit/631f07ad0c1cb93d9da42cf2c8499584fe91880a)) +
+ +## 0.10.0 (2025-04-25) + +### New Features + + - Expose parsing for Time + +### New Features (BREAKING) + + - remove `Time::sign` field as it's not needed anymore to round-trip. + Round-tripping is now handled in the `gix-actor` crate using the `SignatureRef` + type. + +### Bug Fixes (BREAKING) + + - turn `SignatureRef::time` field into `&str`. + We also add a `gix_date::Time::to_str()` method, along with related utilities, + to be able to turn a parsed time back into a raw buffer conveniently. + + Further, remove `Time::to_bstring()` in favor of a `Display` implementation. + +### Commit Statistics + + + + - 15 commits contributed to the release. + - 3 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Thanks Clippy + + + +[Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-date v0.10.0, gix-utils v0.2.1, gix-actor v0.35.0, gix-validate v0.9.5, gix-path v0.10.15, gix-features v0.42.0, gix-hash v0.17.1, gix-object v0.49.0, gix-glob v0.19.1, gix-quote v0.5.1, gix-attributes v0.25.0, gix-command v0.5.1, gix-packetline-blocking v0.18.4, gix-filter v0.19.0, gix-fs v0.14.0, gix-commitgraph v0.27.1, gix-revwalk v0.20.0, gix-traverse v0.46.0, gix-worktree-stream v0.21.0, gix-archive v0.21.0, gix-tempfile v17.0.1, gix-lock v17.0.1, gix-index v0.39.0, gix-config-value v0.14.13, gix-pathspec v0.10.1, gix-ignore v0.14.1, gix-worktree v0.40.0, gix-diff v0.52.0, gix-blame v0.2.0, gix-ref v0.51.0, gix-sec v0.10.13, gix-config v0.45.0, gix-prompt v0.10.1, gix-url v0.30.1, gix-credentials v0.28.1, gix-discover v0.40.0, gix-dir v0.14.0, gix-mailmap v0.27.0, gix-revision v0.34.0, gix-merge v0.5.0, gix-negotiate v0.20.0, gix-pack v0.59.0, gix-odb v0.69.0, gix-refspec v0.30.0, gix-shallow v0.3.1, gix-packetline v0.18.5, gix-transport v0.46.0, gix-protocol v0.50.0, gix-status v0.19.0, gix-submodule v0.19.0, gix-worktree-state v0.18.0, gix v0.72.0, gix-fsck v0.11.0, gitoxide-core v0.46.0, gitoxide v0.43.0, safety bump 30 crates ([`db0b095`](https://github.com/GitoxideLabs/gitoxide/commit/db0b0957930e3ebb1b3f05ed8d7e7a557eb384a2)) + - Update changelogs prior to release ([`0bf84db`](https://github.com/GitoxideLabs/gitoxide/commit/0bf84dbc041f59efba06adcf422c60b5d6e350f0)) + - Merge pull request #1935 from pierrechevalier83/fix_1923 ([`3b1bef7`](https://github.com/GitoxideLabs/gitoxide/commit/3b1bef7cc40e16b61bcc117ca90ebae21df7c7b1)) + - J fmt ([`c3c6504`](https://github.com/GitoxideLabs/gitoxide/commit/c3c650448f92bcb27194ce0a51f7d604ce87920d)) + - Thanks clippy ([`6f009d7`](https://github.com/GitoxideLabs/gitoxide/commit/6f009d781da9e931d44b113a925a80e77e8788af)) + - Remove `Time::sign` field as it's not needed anymore to round-trip. ([`d559fa7`](https://github.com/GitoxideLabs/gitoxide/commit/d559fa7d96a06372855fdef3c7ab3a7083ba7172)) + - Adapt to changes in `gix-date` and `gix-actor` ([`afdf1a5`](https://github.com/GitoxideLabs/gitoxide/commit/afdf1a5d5c9fb2645f481c17f580ad59d14d6095)) + - Turn `SignatureRef::time` field into `&str`. ([`57366d3`](https://github.com/GitoxideLabs/gitoxide/commit/57366d3ebd622af8927bb0e199ab8a3c0eafee99)) + - Apply feedback from discussion ([`70097c0`](https://github.com/GitoxideLabs/gitoxide/commit/70097c0feb481541ed96358842de96d6b1af24a9)) + - Expose parsing for Time ([`37367d7`](https://github.com/GitoxideLabs/gitoxide/commit/37367d708e0aea72bf3cef00808ab0069be0a606)) + - Merge pull request #1968 from GitoxideLabs/dependabot/cargo/cargo-bd18780e40 ([`46227e6`](https://github.com/GitoxideLabs/gitoxide/commit/46227e6d1ddc0879662730e5bb21a8597716b1ca)) + - Bump the cargo group with 40 updates ([`06bf1e1`](https://github.com/GitoxideLabs/gitoxide/commit/06bf1e1552de65ce692911bdc4c501d487bbc3d7)) + - Merge pull request #1949 from GitoxideLabs/dependabot/cargo/cargo-6893e2988a ([`b5e9059`](https://github.com/GitoxideLabs/gitoxide/commit/b5e905991155ace32ef21464e69a8369a773f02b)) + - Bump the cargo group with 21 updates ([`68e6b2e`](https://github.com/GitoxideLabs/gitoxide/commit/68e6b2e54613fe788d645ea8c942c71a39c6ede1)) + - Merge pull request #1919 from GitoxideLabs/release ([`420e730`](https://github.com/GitoxideLabs/gitoxide/commit/420e730f765b91e1d17daca6bb1f99bdb2e54fda)) +
+ ## 0.9.4 (2025-04-04) @@ -17,7 +126,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 9 commits contributed to the release. + - 10 commits contributed to the release. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -34,6 +143,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release gix-date v0.9.4, gix-utils v0.2.0, gix-actor v0.34.0, gix-features v0.41.0, gix-hash v0.17.0, gix-hashtable v0.8.0, gix-path v0.10.15, gix-validate v0.9.4, gix-object v0.48.0, gix-glob v0.19.0, gix-quote v0.5.0, gix-attributes v0.25.0, gix-command v0.5.0, gix-packetline-blocking v0.18.3, gix-filter v0.18.0, gix-fs v0.14.0, gix-commitgraph v0.27.0, gix-revwalk v0.19.0, gix-traverse v0.45.0, gix-worktree-stream v0.20.0, gix-archive v0.20.0, gix-tempfile v17.0.0, gix-lock v17.0.0, gix-index v0.39.0, gix-config-value v0.14.12, gix-pathspec v0.10.0, gix-ignore v0.14.0, gix-worktree v0.40.0, gix-diff v0.51.0, gix-blame v0.1.0, gix-ref v0.51.0, gix-config v0.44.0, gix-prompt v0.10.0, gix-url v0.30.0, gix-credentials v0.28.0, gix-discover v0.39.0, gix-dir v0.13.0, gix-mailmap v0.26.0, gix-revision v0.33.0, gix-merge v0.4.0, gix-negotiate v0.19.0, gix-pack v0.58.0, gix-odb v0.68.0, gix-refspec v0.29.0, gix-shallow v0.3.0, gix-packetline v0.18.4, gix-transport v0.46.0, gix-protocol v0.49.0, gix-status v0.18.0, gix-submodule v0.18.0, gix-worktree-state v0.18.0, gix v0.71.0, gix-fsck v0.10.0, gitoxide-core v0.46.0, gitoxide v0.42.0, safety bump 48 crates ([`b41312b`](https://github.com/GitoxideLabs/gitoxide/commit/b41312b478b0d19efb330970cf36dba45d0fbfbd)) - Update changelogs prior to release ([`38dff41`](https://github.com/GitoxideLabs/gitoxide/commit/38dff41d09b6841ff52435464e77cd012dce7645)) - Merge pull request #1908 from EliahKagan/run-ci/scripts ([`c8c42b4`](https://github.com/GitoxideLabs/gitoxide/commit/c8c42b4b86e8bf7d8f0f7130d2da98dfed246be9)) - Add regenerated `generate_git_date_baseline` archive ([`2dbd7ba`](https://github.com/GitoxideLabs/gitoxide/commit/2dbd7ba901245ec17ec9a966e435922fc859292a)) diff --git a/gix-date/Cargo.toml b/gix-date/Cargo.toml index ebf8642903d..16ce68bbb5d 100644 --- a/gix-date/Cargo.toml +++ b/gix-date/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "gix-date" -version = "0.9.4" +version = "0.10.2" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project parsing dates the way git does" @@ -19,18 +19,21 @@ doctest = false serde = ["dep:serde", "bstr/serde"] [dependencies] -bstr = { version = "1.3.0", default-features = false, features = ["std"] } +bstr = { version = "1.12.0", default-features = false, features = ["std"] } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } itoa = "1.0.1" -jiff = "0.2.0" +jiff = "0.2.12" thiserror = "2.0.0" +# TODO: used for quick and easy `TimeBacking: std::io::Write` implementation, but could make that `Copy` +# and remove this dep with custom impl +smallvec = { version = "1.15.0", features = ["write"] } document-features = { version = "0.2.0", optional = true } [dev-dependencies] gix-hash = { path = "../gix-hash" } gix-testtools = { path = "../tests/tools" } -once_cell = "1.12.0" +once_cell = "1.21.3" pretty_assertions = "1.4.1" [package.metadata.docs.rs] diff --git a/gix-date/src/lib.rs b/gix-date/src/lib.rs index 20893a7cab8..68d39dfda84 100644 --- a/gix-date/src/lib.rs +++ b/gix-date/src/lib.rs @@ -7,29 +7,25 @@ doc = ::document_features::document_features!() )] #![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))] -#![deny(missing_docs, rust_2018_idioms)] -#![forbid(unsafe_code)] - +#![deny(missing_docs, rust_2018_idioms, unsafe_code)] /// pub mod time; /// pub mod parse; -pub use parse::function::parse; +pub use parse::function::{parse, parse_header}; /// A timestamp with timezone. -#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)] +#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Time { - /// The seconds that passed since UNIX epoch. This makes it UTC, or `+0000`. + /// The seconds that have passed since UNIX epoch. This makes it UTC, or `+0000`. pub seconds: SecondsSinceUnixEpoch, /// The time's offset in seconds, which may be negative to match the `sign` field. pub offset: OffsetInSeconds, - /// the sign of `offset`, used to encode `-0000` which would otherwise lose sign information. - pub sign: time::Sign, } -/// The amount of seconds since unix epoch. +/// The number of seconds since unix epoch. /// /// Note that negative dates represent times before the unix epoch. /// diff --git a/gix-date/src/parse.rs b/gix-date/src/parse.rs index afd3470ac60..2dfba0f0532 100644 --- a/gix-date/src/parse.rs +++ b/gix-date/src/parse.rs @@ -1,3 +1,9 @@ +use std::str::FromStr; + +use smallvec::SmallVec; + +use crate::Time; + #[derive(thiserror::Error, Debug, Clone)] #[allow(missing_docs)] pub enum Error { @@ -11,6 +17,61 @@ pub enum Error { MissingCurrentTime, } +/// A container for just enough bytes to hold the largest-possible [`time`](Time) instance. +/// It's used in conjunction with +#[derive(Default, Clone)] +pub struct TimeBuf { + buf: SmallVec<[u8; Time::MAX.size()]>, +} + +impl TimeBuf { + /// Represent this instance as standard string, serialized in a format compatible with + /// signature fields in Git commits, also known as anything parseable as [raw format](function::parse_header()). + pub fn as_str(&self) -> &str { + // SAFETY: We know that serialized times are pure ASCII, a subset of UTF-8. + // `buf` and `len` are written only by time-serialization code. + let time_bytes = self.buf.as_slice(); + #[allow(unsafe_code)] + unsafe { + std::str::from_utf8_unchecked(time_bytes) + } + } + + /// Clear the previous content. + fn clear(&mut self) { + self.buf.clear(); + } +} + +impl std::io::Write for TimeBuf { + fn write(&mut self, buf: &[u8]) -> std::io::Result { + self.buf.write(buf) + } + + fn flush(&mut self) -> std::io::Result<()> { + self.buf.flush() + } +} + +impl Time { + /// Serialize this instance into `buf`, exactly as it would appear in the header of a Git commit, + /// and return `buf` as `&str` for easy consumption. + pub fn to_str<'a>(&self, buf: &'a mut TimeBuf) -> &'a str { + buf.clear(); + self.write_to(buf) + .expect("write to memory of just the right size cannot fail"); + buf.as_str() + } +} + +impl FromStr for Time { + type Err = Error; + + fn from_str(s: &str) -> Result { + crate::parse_header(s).ok_or_else(|| Error::InvalidDateString { input: s.into() }) + } +} + pub(crate) mod function { use std::{str::FromStr, time::SystemTime}; @@ -18,14 +79,71 @@ pub(crate) mod function { use crate::{ parse::{relative, Error}, - time::{ - format::{DEFAULT, GITOXIDE, ISO8601, ISO8601_STRICT, SHORT}, - Sign, - }, - SecondsSinceUnixEpoch, Time, + time::format::{DEFAULT, GITOXIDE, ISO8601, ISO8601_STRICT, SHORT}, + OffsetInSeconds, SecondsSinceUnixEpoch, Time, }; - #[allow(missing_docs)] + /// Parse `input` as any time that Git can parse when inputting a date. + /// + /// ## Examples + /// + /// ### 1. SHORT Format + /// + /// * `2018-12-24` + /// * `1970-01-01` + /// * `1950-12-31` + /// * `2024-12-31` + /// + /// ### 2. RFC2822 Format + /// + /// * `Thu, 18 Aug 2022 12:45:06 +0800` + /// * `Mon Oct 27 10:30:00 2023 -0800` + /// + /// ### 3. GIT_RFC2822 Format + /// + /// * `Thu, 8 Aug 2022 12:45:06 +0800` + /// * `Mon Oct 27 10:30:00 2023 -0800` (Note the single-digit day) + /// + /// ### 4. ISO8601 Format + /// + /// * `2022-08-17 22:04:58 +0200` + /// * `1970-01-01 00:00:00 -0500` + /// + /// ### 5. ISO8601_STRICT Format + /// + /// * `2022-08-17T21:43:13+08:00` + /// + /// ### 6. UNIX Timestamp (Seconds Since Epoch) + /// + /// * `123456789` + /// * `0` (January 1, 1970 UTC) + /// * `-1000` + /// * `1700000000` + /// + /// ### 7. Commit Header Format + /// + /// * `1745582210 +0200` + /// * `1660874655 +0800` + /// * `-1660874655 +0800` + /// + /// See also the [`parse_header()`]. + /// + /// ### 8. GITOXIDE Format + /// + /// * `Thu Sep 04 2022 10:45:06 -0400` + /// * `Mon Oct 27 2023 10:30:00 +0000` + /// + /// ### 9. DEFAULT Format + /// + /// * `Thu Sep 4 10:45:06 2022 -0400` + /// * `Mon Oct 27 10:30:00 2023 +0000` + /// + /// ### 10. Relative Dates (e.g., "2 minutes ago", "1 hour from now") + /// + /// These dates are parsed *relative to a `now` timestamp*. The examples depend entirely on the value of `now`. + /// If `now` is October 27, 2023 at 10:00:00 UTC: + /// * `2 minutes ago` (October 27, 2023 at 09:58:00 UTC) + /// * `3 hours ago` (October 27, 2023 at 07:00:00 UTC) pub fn parse(input: &str, now: Option) -> Result { // TODO: actual implementation, this is just to not constantly fail if input == "1979-02-26 18:30:00" { @@ -50,39 +168,73 @@ pub(crate) mod function { } else if let Ok(val) = SecondsSinceUnixEpoch::from_str(input) { // Format::Unix Time::new(val, 0) - } else if let Some(val) = parse_raw(input) { - // Format::Raw - val } else if let Some(val) = relative::parse(input, now).transpose()? { Time::new(val.timestamp().as_second(), val.offset().seconds()) + } else if let Some(val) = parse_header(input) { + // Format::Raw + val } else { return Err(Error::InvalidDateString { input: input.into() }); }) } - fn parse_raw(input: &str) -> Option