diff --git a/.gitattributes b/.gitattributes
index 21a8a6960ba..c3e94f4dbf1 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,8 @@
**/generated-archives/*.tar.xz filter=lfs-disabled diff=lfs merge=lfs -text
-# assure line feeds don't interfere with our working copy hash
+# assure line feeds don't interfere with our working copy hash
**/tests/fixtures/**/*.sh text crlf=input eol=lf
/justfile text crlf=input eol=lf
+
+# have GitHub treat the gix-packetline-blocking src copy as auto-generated
+gix-packetline-blocking/src/ linguist-generated=true
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000000..ce30635aa48
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,9 @@
+version: 2
+updates:
+- package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: weekly
+ groups:
+ github-actions:
+ patterns: ["*"]
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4ce6e9e5b7f..640f112c6ef 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
container: debian:buster
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Prerequisites
run: apt-get update && apt-get install --no-install-recommends -y ca-certificates curl gcc libc-dev # gcc is required as OS abstraction
- name: install Rust via Rustup
@@ -47,18 +47,18 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@stable
- - uses: Swatinem/rust-cache@v2
- - name: Setup dependencies
- run:
- sudo apt-get install tree
- - uses: extractions/setup-just@v1
- - name: test
- env:
- CI: true
- GITOXIDE_TEST_IGNORE_ARCHIVES: 1
- run: just ci-test
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+ - name: Setup dependencies
+ run:
+ sudo apt-get install tree
+ - uses: extractions/setup-just@v2
+ - name: test
+ env:
+ CI: true
+ GIX_TEST_IGNORE_ARCHIVES: 1
+ run: just ci-test
test-fast:
strategy:
@@ -69,7 +69,7 @@ jobs:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup dependencies (macos)
@@ -79,10 +79,7 @@ jobs:
- name: "cargo check default features"
if: startsWith(matrix.os, 'windows')
run: cargo check --all --bins --examples
- - run: |
- # it should never be a failure not to get the caches, as they can be regenerated.
- git lfs fetch && git lfs checkout || true
- - uses: taiki-e/install-action@v1
+ - uses: taiki-e/install-action@v2
with:
tool: nextest
- name: "Test (nextest)"
@@ -94,7 +91,7 @@ jobs:
matrix:
target: [ armv7-linux-androideabi ]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Rust
@@ -102,7 +99,7 @@ jobs:
with:
toolchain: stable
targets: ${{ matrix.target }}
- - uses: taiki-e/install-action@v1
+ - uses: taiki-e/install-action@v2
with:
tool: cross
- name: "check"
@@ -135,7 +132,7 @@ jobs:
target: i686-pc-windows-gnu
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
@@ -150,20 +147,20 @@ jobs:
- name: "Install prerequisites"
run: vcpkg install zlib:x64-windows-static-md
- name: "Installation from crates.io: gitoxide"
- run: cargo +${{ matrix.rust }} install --target ${{ matrix.target }} --target-dir install-artifacts --debug --force gitoxide
+ run: cargo +${{ matrix.rust }} install --target ${{ matrix.target }} --no-default-features --features max-pure --target-dir install-artifacts --debug --force gitoxide
shell: msys2 {0}
lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy,rustfmt
- - uses: extractions/setup-just@v1
+ - uses: extractions/setup-just@v2
- name: Run cargo clippy
- run: just clippy -D warnings
+ run: just clippy -D warnings -A unknown-lints
- name: Run cargo doc
run: just doc
- name: Run cargo fmt
@@ -176,7 +173,7 @@ jobs:
# Let's not fail CI for this, it will fail locally often enough, and a crate a little bigger
# than allows is no problem either if it comes to that.
just check-size || true
-
+
cargo-deny:
runs-on: ubuntu-latest
strategy:
@@ -189,10 +186,11 @@ jobs:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- - uses: actions/checkout@v3
- - uses: EmbarkStudios/cargo-deny-action@v1
- with:
- command: check ${{ matrix.checks }}
+ - uses: actions/checkout@v4
+ - uses: EmbarkStudios/cargo-deny-action@v1
+ with:
+ command: check ${{ matrix.checks }}
+
wasm:
name: WebAssembly
runs-on: ubuntu-latest
@@ -213,3 +211,32 @@ jobs:
name: crates with 'wasm' feature
- run: cd gix-pack && cargo build --all-features --target ${{ matrix.target }}
name: gix-pack with all features (including wasm)
+
+ check-packetline:
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-latest
+ # We consider this script read-only and its effect is the same everywhere.
+ # However, when changes are made to `etc/copy-packetline.sh`, re-enable the other platforms for testing.
+ # - macos-latest
+ # - windows-latest
+ runs-on: ${{ matrix.os }}
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - uses: actions/checkout@v4
+ - name: Check that working tree is initially clean
+ run: |
+ set -x
+ git status
+ git diff --exit-code
+ - name: Regenerate gix-packetline-blocking/src
+ run: etc/copy-packetline.sh
+ - name: Check that gix-packetline-blocking/src was already up to date
+ run: |
+ set -x
+ git status
+ git diff --exit-code
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
index 0fd6950846c..350029cec1f 100644
--- a/.github/workflows/cifuzz.yml
+++ b/.github/workflows/cifuzz.yml
@@ -17,7 +17,7 @@ jobs:
language: rust
fuzz-seconds: 600
- name: Upload Crash
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml
index 812b3ec7cf0..c4479841d8a 100644
--- a/.github/workflows/cron.yml
+++ b/.github/workflows/cron.yml
@@ -9,7 +9,7 @@ jobs:
stress:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: stress
run: make stress
diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml
index 1e77eaa241d..4d2e98cbfd7 100644
--- a/.github/workflows/msrv.yml
+++ b/.github/workflows/msrv.yml
@@ -18,8 +18,13 @@ jobs:
- windows-2019
- ubuntu-latest
runs-on: ${{ matrix.os }}
+ env:
+ # dictated by `firefox` to support the `helix` editor, but now driven by the `time` crate. IMPORTANT: adjust etc/msrv-badge.svg as well
+ rust_version: 1.67.0
steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.67.0 # dictated by `firefox` to support the `helix` editor, but now driven by the `time` crate. IMPORTANT: adjust etc/msrv-badge.svg as well
- - uses: extractions/setup-just@v1
+ - uses: actions/checkout@v4
+ - uses: extractions/setup-just@v2
+ - run: |
+ rustup toolchain install ${{ env.rust_version }} --profile minimal --no-self-update
+ rustup default ${{ env.rust_version }}
- run: just ci-check-msrv
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3cb6d99c6f0..06e73353cfd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -60,7 +60,7 @@ jobs:
run: echo "${{ env.ARTIFACT_VERSION }}" > artifacts/release-version
- name: Upload artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts
@@ -129,7 +129,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 1
@@ -161,7 +161,7 @@ jobs:
echo "target dir is: ${{ env.TARGET_DIR }}"
- name: Get release download URL
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts
@@ -211,7 +211,7 @@ jobs:
fi
- name: Upload release archive
- uses: actions/upload-release-asset@v1.0.1
+ uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
diff --git a/.gitignore b/.gitignore
index 33cedd75f8d..78cd84318a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,6 @@ $/tests/fixtures/commit-graphs/
# newer Git sees these as precious, older Git falls through to the pattern above
$**/fuzz/Cargo.lock
+
+# Instead of adding more environment-specific ignores here, like for the IDE in use, prefer Git's user-global
+# `core.excludesFile` mechanism, see https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreexcludesFile.
diff --git a/.gov/info.yml b/.gov/info.yml
index 2adfce84eee..5c835210b13 100644
--- a/.gov/info.yml
+++ b/.gov/info.yml
@@ -8,6 +8,6 @@ maintainers:
- push directly to 'main' branch
- reviews or suggestions by other maintainers if PRs are used
- co-ownership of contributed crates
- - reveive sponsorship via GitHub from project page
+ - receive sponsorship via GitHub from project page
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 228c6207b8e..a4046ac2cc1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,123 @@ 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.36.0 (2024-05-22)
+
+### New Features
+
+ - checkout respects options for `core.protectHFS` and `core.protectNTFS`.
+ This also adds `gitoxide.core.protectWindows` as a way to enforce
+ additional restrictions that are usually only available on Windows.
+
+ Note that `core.protectNFS` is always enabled by default, just like
+ [it is in Git](https://github.com/git/git/commit/9102f958ee5254b10c0be72672aa3305bf4f4704).
+
+### Bug Fixes
+
+ - more robustness in the face of a trampling-herd of threads loading a single index.
+ The motivating example is here: https://github.com/praetorian-inc/noseyparker/issues/179
+
+ Previously, it was possible for a trampling herd of threads to consolidate the
+ disk state. Most of them would be 'needs-init' threads which could notice that
+ the initialization already happened, and just use that.
+
+ But a thread might be late for the party and somehow manages to not get any
+ newly loaded index, and thus tries to consolidate with what's on disk again.
+ Then it would again determine no change, and return nothing, causing the caller
+ to abort and not find objects it should find because it wouldn't see the index
+ that it should have seen.
+
+ The reason the thread got into this mess is that the 'is-load-ongoing' flagging
+ was racy itself, so it would not wait for ongoing loads and just conclude nothing
+ happened. An extra delay (by yielding) now assures it either seees the loading state
+ and waits for it, sees the newly loaded indices.
+
+ Note that this issue can be reproduced with:
+
+ ```
+ './target/release/gix -r repo-with-one-pack -t10 --trace odb stats --extra-header-lookup'
+ ```
+
+### Commit Statistics
+
+
+
+ - 6 commits contributed to the release over the course of 10 calendar days.
+ - 38 days passed between releases.
+ - 2 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+
+
+view details
+
+ * **Uncategorized**
+ - Merge branch 'various-fixes' ([`d6cd449`](https://github.com/Byron/gitoxide/commit/d6cd44930fb204b06e2b70fc6965e7705530c47a))
+ - Merge pull request from GHSA-7w47-3wg8-547c ([`79dce79`](https://github.com/Byron/gitoxide/commit/79dce79c62f6072aa2653780d590dc3993dfa401))
+ - Checkout respects options for `core.protectHFS` and `core.protectNTFS`. ([`886d6b5`](https://github.com/Byron/gitoxide/commit/886d6b58e4612ac21cc660ea4ddf1dd0b49d1c6e))
+ - Mark safety-related core-flags as planned ([`f3d5a69`](https://github.com/Byron/gitoxide/commit/f3d5a69bbe0ad14502ce617dc580cc2aa481bb0a))
+ - Merge branch 'status' ([`04ef31e`](https://github.com/Byron/gitoxide/commit/04ef31e9d6f5332d49037a5a4c248ebbb5aaf92b))
+ - More robustness in the face of a trampling-herd of threads loading a single index. ([`addf446`](https://github.com/Byron/gitoxide/commit/addf446f052ff74edcdb083f2b2968b313daa940))
+
+
+## 0.35.0 (2024-04-13)
+
+### New Features
+
+ - add `gix status --ignored` support
+ - add `gix status --index-worktree-renames`
+ This enables rename-tracking between worktree and index, something
+ that Git also doesn't do or doesn't do by default.
+ It is, however, available in `git2`.
+ - `gix status` with submodule and rewrite support.
+ Submodule changes are now picked up as long as the submodule is
+ in the index.
+ Further, it's possible to enable rename-tracking between
+ index and worktree separately.
+ - add `gix is-clean|is-changed`
+ It's a good way to compare the time it takes to run a full status
+ compared to a quick is-dirty check.
+ - `gix submodules list --dirty-suffix` for dirty-information
+ This is a submodule-centric and greatly simplified way of obtaining
+ describe information with dirty-suffix.
+
+ Note that `status` information is also possible, but it seems
+ hard to display nicely, which this command isn't great at
+ in the first place.
+ - add `gix commit describe --dirty-suffix`
+ That way a suffix will be added depending on the dirty-state of the repository.
+
+### Commit Statistics
+
+
+
+ - 11 commits contributed to the release over the course of 34 calendar days.
+ - 47 days passed between releases.
+ - 6 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+
+
+view details
+
+ * **Uncategorized**
+ - Merge pull request #1341 from szepeviktor/typos ([`55f379b`](https://github.com/Byron/gitoxide/commit/55f379bc47065822d078393d83d30c0835a89782))
+ - Fix typos ([`f72ecce`](https://github.com/Byron/gitoxide/commit/f72ecce45babcad2a0c9b73c79d01ff502907a57))
+ - Merge branch 'status' ([`3e5c974`](https://github.com/Byron/gitoxide/commit/3e5c974dd62ac134711c6c2f5a5490187a6ea55e))
+ - Add `gix status --format` to communicate the current format is very simple. ([`23bea36`](https://github.com/Byron/gitoxide/commit/23bea36f046a6f652cd1e06885ae132c85bb4f05))
+ - Add `gix status --ignored` support ([`84c74ff`](https://github.com/Byron/gitoxide/commit/84c74ffa698d35f8395c63db6acd3d0e6700d07f))
+ - Add `gix status --index-worktree-renames` ([`66e87cd`](https://github.com/Byron/gitoxide/commit/66e87cd31c060c3f97ac685ee0541c408f600362))
+ - Fix lints for nightly, and clippy ([`f8ce3d0`](https://github.com/Byron/gitoxide/commit/f8ce3d0721b6a53713a9392f2451874f520bc44c))
+ - `gix status` with submodule and rewrite support. ([`61c002b`](https://github.com/Byron/gitoxide/commit/61c002bc4ca5b5345c411e561fdcb492e7ae1d97))
+ - Add `gix is-clean|is-changed` ([`98b3680`](https://github.com/Byron/gitoxide/commit/98b368095ec99d1bc287da7f9294a9fce424deed))
+ - `gix submodules list --dirty-suffix` for dirty-information ([`afd20ca`](https://github.com/Byron/gitoxide/commit/afd20caadb40b6b793f2099b7232669f9a8f9086))
+ - Add `gix commit describe --dirty-suffix` ([`58231b4`](https://github.com/Byron/gitoxide/commit/58231b418fa39ea122ef41bb7691289f5b0be855))
+
+
## 0.34.0 (2024-02-25)
### New Features
diff --git a/Cargo.lock b/Cargo.lock
index deac531b0d6..7e986db4455 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -62,23 +62,24 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.5"
+version = "0.6.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6"
+checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
+ "is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.4"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
+checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
[[package]]
name = "anstyle-parse"
@@ -114,6 +115,15 @@ version = "1.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9d19de80eff169429ac1e9f48fffb163916b448a44e8e046186232046d9e1f9"
+[[package]]
+name = "arbitrary"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
+dependencies = [
+ "derive_arbitrary",
+]
+
[[package]]
name = "arc-swap"
version = "1.6.0"
@@ -175,7 +185,7 @@ dependencies = [
"async-lock 3.2.0",
"async-task",
"concurrent-queue",
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"futures-lite 2.1.0",
"slab",
]
@@ -348,6 +358,12 @@ version = "0.21.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
[[package]]
name = "basic-toml"
version = "0.1.7"
@@ -390,7 +406,7 @@ dependencies = [
"async-channel 2.1.1",
"async-lock 3.2.0",
"async-task",
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"futures-io",
"futures-lite 2.1.0",
"piper",
@@ -419,15 +435,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.14.0"
+version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
-
-[[package]]
-name = "byteorder"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytes"
@@ -640,9 +650,9 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
[[package]]
name = "crc32fast"
-version = "1.3.2"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
@@ -699,11 +709,10 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
-version = "0.5.10"
+version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2"
+checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
dependencies = [
- "cfg-if",
"crossbeam-utils",
]
@@ -741,12 +750,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.18"
+version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c"
-dependencies = [
- "cfg-if",
-]
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crossterm"
@@ -802,24 +808,24 @@ dependencies = [
[[package]]
name = "curl"
-version = "0.4.44"
+version = "0.4.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22"
+checksum = "1e2161dd6eba090ff1594084e95fd67aeccf04382ffea77999ea94ed42ec67b6"
dependencies = [
"curl-sys",
"libc",
"openssl-probe",
"openssl-sys",
"schannel",
- "socket2 0.4.10",
- "winapi",
+ "socket2 0.5.5",
+ "windows-sys 0.52.0",
]
[[package]]
name = "curl-sys"
-version = "0.4.70+curl-8.5.0"
+version = "0.4.72+curl-8.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e"
+checksum = "29cbdc8314c447d11e8fd156dcdd031d9e02a7a976163e396b548c03153bc9ea"
dependencies = [
"cc",
"libc",
@@ -828,7 +834,7 @@ dependencies = [
"pkg-config",
"rustls-ffi",
"vcpkg",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -844,17 +850,11 @@ dependencies = [
"parking_lot_core",
]
-[[package]]
-name = "data-encoding"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
-
[[package]]
name = "defer"
-version = "0.1.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "647605a6345d5e89c3950a36a638c56478af9b414c55c6f2477c73b115f9acde"
+checksum = "930c7171c8df9fb1782bdf9b918ed9ed2d33d1d22300abb754f9085bc48bf8e8"
[[package]]
name = "deranged"
@@ -865,6 +865,17 @@ dependencies = [
"powerfmt",
]
+[[package]]
+name = "derive_arbitrary"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.47",
+]
+
[[package]]
name = "diff"
version = "0.1.13"
@@ -881,6 +892,17 @@ dependencies = [
"crypto-common",
]
+[[package]]
+name = "displaydoc"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.47",
+]
+
[[package]]
name = "document-features"
version = "0.2.8"
@@ -911,23 +933,11 @@ dependencies = [
"cfg-if",
]
-[[package]]
-name = "enum-as-inner"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "syn 2.0.47",
-]
-
[[package]]
name = "env_logger"
-version = "0.10.1"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece"
+checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
dependencies = [
"humantime",
"is-terminal",
@@ -1022,9 +1032,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.0.1"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
+checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
[[package]]
name = "filetime"
@@ -1164,7 +1174,7 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143"
dependencies = [
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"futures-core",
"futures-io",
"parking",
@@ -1231,7 +1241,7 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "gitoxide"
-version = "0.34.0"
+version = "0.36.1"
dependencies = [
"anyhow",
"clap",
@@ -1242,7 +1252,7 @@ dependencies = [
"futures-lite 2.1.0",
"gitoxide-core",
"gix",
- "gix-features 0.38.0",
+ "gix-features 0.38.2",
"is-terminal",
"once_cell",
"prodash 28.0.0",
@@ -1256,7 +1266,7 @@ dependencies = [
[[package]]
name = "gitoxide-core"
-version = "0.36.0"
+version = "0.38.0"
dependencies = [
"anyhow",
"async-io 2.2.2",
@@ -1294,66 +1304,65 @@ dependencies = [
[[package]]
name = "gix"
-version = "0.59.0"
+version = "0.63.0"
dependencies = [
"anyhow",
"async-std",
- "curl",
"document-features",
- "gix-actor 0.30.1",
+ "gix-actor 0.31.2",
"gix-archive",
- "gix-attributes 0.22.1",
+ "gix-attributes 0.22.2",
"gix-command",
- "gix-commitgraph 0.24.1",
+ "gix-commitgraph 0.24.2",
"gix-config",
"gix-credentials",
- "gix-date 0.8.4",
+ "gix-date 0.8.6",
"gix-diff",
"gix-dir",
- "gix-discover 0.30.0",
- "gix-features 0.38.0",
+ "gix-discover 0.32.0",
+ "gix-features 0.38.2",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-glob 0.16.1",
- "gix-hash 0.14.1",
- "gix-hashtable 0.5.1",
- "gix-ignore 0.11.1",
- "gix-index 0.30.0",
- "gix-lock 13.1.0",
+ "gix-fs 0.11.1",
+ "gix-glob 0.16.3",
+ "gix-hash 0.14.2",
+ "gix-hashtable 0.5.2",
+ "gix-ignore 0.11.2",
+ "gix-index 0.33.0",
+ "gix-lock 14.0.0",
"gix-macros",
"gix-mailmap",
"gix-negotiate",
- "gix-object 0.41.1",
+ "gix-object 0.42.2",
"gix-odb",
"gix-pack",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"gix-pathspec",
"gix-prompt",
"gix-protocol",
- "gix-ref 0.42.0",
+ "gix-ref 0.44.1",
"gix-refspec",
"gix-revision",
- "gix-revwalk 0.12.0",
- "gix-sec 0.10.5",
+ "gix-revwalk 0.13.1",
+ "gix-sec 0.10.6",
"gix-status",
"gix-submodule",
- "gix-tempfile 13.1.0",
+ "gix-tempfile 14.0.0",
"gix-testtools",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"gix-transport",
- "gix-traverse 0.37.0",
+ "gix-traverse 0.39.1",
"gix-url",
- "gix-utils 0.1.10",
- "gix-validate 0.8.3",
- "gix-worktree 0.31.0",
+ "gix-utils 0.1.12",
+ "gix-validate 0.8.5",
+ "gix-worktree 0.34.0",
"gix-worktree-state",
"gix-worktree-stream",
"is_ci",
"once_cell",
"parking_lot",
+ "pretty_assertions",
"prodash 28.0.0",
"regex",
- "reqwest",
"serde",
"serial_test",
"signal-hook",
@@ -1392,15 +1401,15 @@ dependencies = [
[[package]]
name = "gix-actor"
-version = "0.30.1"
+version = "0.31.2"
dependencies = [
"bstr",
"document-features",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
"gix-testtools",
- "gix-utils 0.1.10",
+ "gix-utils 0.1.12",
"itoa",
"pretty_assertions",
"serde",
@@ -1410,20 +1419,20 @@ dependencies = [
[[package]]
name = "gix-archive"
-version = "0.10.0"
+version = "0.13.1"
dependencies = [
"bstr",
"document-features",
"flate2",
- "gix-attributes 0.22.1",
- "gix-date 0.8.4",
+ "gix-attributes 0.22.2",
+ "gix-date 0.8.6",
"gix-filter",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"gix-testtools",
- "gix-worktree 0.31.0",
+ "gix-worktree 0.34.0",
"gix-worktree-stream",
"tar",
"thiserror",
@@ -1450,16 +1459,16 @@ dependencies = [
[[package]]
name = "gix-attributes"
-version = "0.22.1"
+version = "0.22.2"
dependencies = [
"bstr",
"document-features",
- "gix-fs 0.10.0",
- "gix-glob 0.16.1",
- "gix-path 0.10.6",
- "gix-quote 0.4.11",
+ "gix-fs 0.11.1",
+ "gix-glob 0.16.3",
+ "gix-path 0.10.7",
+ "gix-quote 0.4.12",
"gix-testtools",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"kstring",
"serde",
"smallvec",
@@ -1478,7 +1487,7 @@ dependencies = [
[[package]]
name = "gix-bitmap"
-version = "0.2.10"
+version = "0.2.11"
dependencies = [
"gix-testtools",
"thiserror",
@@ -1495,19 +1504,19 @@ dependencies = [
[[package]]
name = "gix-chunk"
-version = "0.4.7"
+version = "0.4.8"
dependencies = [
"thiserror",
]
[[package]]
name = "gix-command"
-version = "0.3.5"
+version = "0.3.7"
dependencies = [
"bstr",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"gix-testtools",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"shell-words",
]
@@ -1527,14 +1536,14 @@ dependencies = [
[[package]]
name = "gix-commitgraph"
-version = "0.24.1"
+version = "0.24.2"
dependencies = [
"bstr",
"document-features",
- "gix-chunk 0.4.7",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
+ "gix-chunk 0.4.8",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
"gix-testtools",
"memmap2 0.9.3",
"serde",
@@ -1543,17 +1552,17 @@ dependencies = [
[[package]]
name = "gix-config"
-version = "0.35.0"
+version = "0.37.0"
dependencies = [
"bstr",
"criterion",
"document-features",
"gix-config-value",
- "gix-features 0.38.0",
- "gix-glob 0.16.1",
- "gix-path 0.10.6",
- "gix-ref 0.42.0",
- "gix-sec 0.10.5",
+ "gix-features 0.38.2",
+ "gix-glob 0.16.3",
+ "gix-path 0.10.7",
+ "gix-ref 0.44.1",
+ "gix-sec 0.10.6",
"memchr",
"once_cell",
"serde",
@@ -1572,21 +1581,21 @@ dependencies = [
"cap",
"gix",
"gix-config",
- "gix-path 0.10.6",
- "gix-ref 0.42.0",
- "gix-sec 0.10.5",
+ "gix-path 0.10.7",
+ "gix-ref 0.44.1",
+ "gix-sec 0.10.6",
"gix-testtools",
"serial_test",
]
[[package]]
name = "gix-config-value"
-version = "0.14.5"
+version = "0.14.6"
dependencies = [
"bitflags 2.4.1",
"bstr",
"document-features",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"libc",
"serde",
"thiserror",
@@ -1594,17 +1603,17 @@ dependencies = [
[[package]]
name = "gix-credentials"
-version = "0.24.1"
+version = "0.24.2"
dependencies = [
"bstr",
"document-features",
"gix-command",
"gix-config-value",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"gix-prompt",
- "gix-sec 0.10.5",
+ "gix-sec 0.10.6",
"gix-testtools",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"gix-url",
"serde",
"thiserror",
@@ -1624,11 +1633,11 @@ dependencies = [
[[package]]
name = "gix-date"
-version = "0.8.4"
+version = "0.8.6"
dependencies = [
"bstr",
"document-features",
- "gix-hash 0.14.1",
+ "gix-hash 0.14.2",
"gix-testtools",
"itoa",
"once_cell",
@@ -1639,20 +1648,20 @@ dependencies = [
[[package]]
name = "gix-diff"
-version = "0.41.0"
+version = "0.44.0"
dependencies = [
"bstr",
"document-features",
"getrandom",
"gix-command",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
- "gix-tempfile 13.1.0",
- "gix-trace 0.1.7",
- "gix-worktree 0.31.0",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
+ "gix-tempfile 14.0.0",
+ "gix-trace 0.1.9",
+ "gix-worktree 0.34.0",
"imara-diff",
"serde",
"thiserror",
@@ -1664,32 +1673,33 @@ version = "0.0.0"
dependencies = [
"gix-diff",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
"gix-testtools",
- "gix-traverse 0.37.0",
- "gix-worktree 0.31.0",
+ "gix-traverse 0.39.1",
+ "gix-worktree 0.34.0",
+ "pretty_assertions",
"shell-words",
]
[[package]]
name = "gix-dir"
-version = "0.1.0"
+version = "0.5.0"
dependencies = [
"bstr",
- "gix-discover 0.30.0",
- "gix-fs 0.10.0",
- "gix-ignore 0.11.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
+ "gix-discover 0.32.0",
+ "gix-fs 0.11.1",
+ "gix-ignore 0.11.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
"gix-pathspec",
"gix-testtools",
- "gix-trace 0.1.7",
- "gix-utils 0.1.10",
- "gix-worktree 0.31.0",
+ "gix-trace 0.1.9",
+ "gix-utils 0.1.12",
+ "gix-worktree 0.34.0",
"pretty_assertions",
"thiserror",
]
@@ -1711,16 +1721,16 @@ dependencies = [
[[package]]
name = "gix-discover"
-version = "0.30.0"
+version = "0.32.0"
dependencies = [
"bstr",
"defer",
"dunce",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-path 0.10.6",
- "gix-ref 0.42.0",
- "gix-sec 0.10.5",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-path 0.10.7",
+ "gix-ref 0.44.1",
+ "gix-sec 0.10.6",
"gix-testtools",
"is_ci",
"serial_test",
@@ -1757,7 +1767,7 @@ dependencies = [
[[package]]
name = "gix-features"
-version = "0.38.0"
+version = "0.38.2"
dependencies = [
"bstr",
"bytes",
@@ -1766,9 +1776,9 @@ dependencies = [
"crossbeam-channel",
"document-features",
"flate2",
- "gix-hash 0.14.1",
- "gix-trace 0.1.7",
- "gix-utils 0.1.10",
+ "gix-hash 0.14.2",
+ "gix-trace 0.1.9",
+ "gix-utils 0.1.12",
"jwalk",
"libc",
"once_cell",
@@ -1786,21 +1796,21 @@ version = "0.0.0"
[[package]]
name = "gix-filter"
-version = "0.10.0"
+version = "0.11.2"
dependencies = [
"bstr",
"encoding_rs",
- "gix-attributes 0.22.1",
+ "gix-attributes 0.22.2",
"gix-command",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-packetline-blocking",
- "gix-path 0.10.6",
- "gix-quote 0.4.11",
+ "gix-path 0.10.7",
+ "gix-quote 0.4.12",
"gix-testtools",
- "gix-trace 0.1.7",
- "gix-utils 0.1.10",
- "gix-worktree 0.31.0",
+ "gix-trace 0.1.9",
+ "gix-utils 0.1.12",
+ "gix-worktree 0.34.0",
"serial_test",
"smallvec",
"thiserror",
@@ -1826,21 +1836,23 @@ dependencies = [
[[package]]
name = "gix-fs"
-version = "0.10.0"
+version = "0.11.1"
dependencies = [
- "gix-features 0.38.0",
- "gix-utils 0.1.10",
+ "crossbeam-channel",
+ "fastrand 2.1.0",
+ "gix-features 0.38.2",
+ "gix-utils 0.1.12",
"serde",
"tempfile",
]
[[package]]
name = "gix-fsck"
-version = "0.3.0"
+version = "0.4.0"
dependencies = [
- "gix-hash 0.14.1",
- "gix-hashtable 0.5.1",
- "gix-object 0.41.1",
+ "gix-hash 0.14.2",
+ "gix-hashtable 0.5.2",
+ "gix-object 0.42.2",
"gix-odb",
"gix-testtools",
]
@@ -1859,13 +1871,13 @@ dependencies = [
[[package]]
name = "gix-glob"
-version = "0.16.1"
+version = "0.16.3"
dependencies = [
"bitflags 2.4.1",
"bstr",
"document-features",
- "gix-features 0.38.0",
- "gix-path 0.10.6",
+ "gix-features 0.38.2",
+ "gix-path 0.10.7",
"gix-testtools",
"serde",
]
@@ -1882,11 +1894,11 @@ dependencies = [
[[package]]
name = "gix-hash"
-version = "0.14.1"
+version = "0.14.2"
dependencies = [
"document-features",
"faster-hex",
- "gix-features 0.38.0",
+ "gix-features 0.38.2",
"gix-testtools",
"serde",
"thiserror",
@@ -1905,9 +1917,9 @@ dependencies = [
[[package]]
name = "gix-hashtable"
-version = "0.5.1"
+version = "0.5.2"
dependencies = [
- "gix-hash 0.14.1",
+ "gix-hash 0.14.2",
"hashbrown 0.14.3",
"parking_lot",
]
@@ -1926,15 +1938,15 @@ dependencies = [
[[package]]
name = "gix-ignore"
-version = "0.11.1"
+version = "0.11.2"
dependencies = [
"bstr",
"document-features",
- "gix-fs 0.10.0",
- "gix-glob 0.16.1",
- "gix-path 0.10.6",
+ "gix-fs 0.11.1",
+ "gix-glob 0.16.3",
+ "gix-path 0.10.7",
"gix-testtools",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"serde",
"unicode-bom",
]
@@ -1964,21 +1976,22 @@ dependencies = [
[[package]]
name = "gix-index"
-version = "0.30.0"
+version = "0.33.0"
dependencies = [
"bitflags 2.4.1",
"bstr",
"document-features",
"filetime",
"fnv",
- "gix-bitmap 0.2.10",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-lock 13.1.0",
- "gix-object 0.41.1",
- "gix-traverse 0.37.0",
- "gix-utils 0.1.10",
+ "gix-bitmap 0.2.11",
+ "gix-features 0.38.2",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-lock 14.0.0",
+ "gix-object 0.42.2",
+ "gix-traverse 0.39.1",
+ "gix-utils 0.1.12",
+ "gix-validate 0.8.5",
"hashbrown 0.14.3",
"itoa",
"libc",
@@ -1995,10 +2008,11 @@ version = "0.0.0"
dependencies = [
"bstr",
"filetime",
- "gix",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
- "gix-index 0.30.0",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
+ "gix-odb",
"gix-testtools",
]
@@ -2030,17 +2044,17 @@ dependencies = [
[[package]]
name = "gix-lock"
-version = "13.1.0"
+version = "14.0.0"
dependencies = [
- "gix-tempfile 13.1.0",
- "gix-utils 0.1.10",
+ "gix-tempfile 14.0.0",
+ "gix-utils 0.1.12",
"tempfile",
"thiserror",
]
[[package]]
name = "gix-macros"
-version = "0.1.3"
+version = "0.1.5"
dependencies = [
"proc-macro2",
"quote",
@@ -2050,12 +2064,12 @@ dependencies = [
[[package]]
name = "gix-mailmap"
-version = "0.22.0"
+version = "0.23.1"
dependencies = [
"bstr",
"document-features",
- "gix-actor 0.30.1",
- "gix-date 0.8.4",
+ "gix-actor 0.31.2",
+ "gix-date 0.8.6",
"gix-testtools",
"serde",
"thiserror",
@@ -2063,16 +2077,16 @@ dependencies = [
[[package]]
name = "gix-negotiate"
-version = "0.12.0"
+version = "0.13.1"
dependencies = [
"bitflags 2.4.1",
- "gix-commitgraph 0.24.1",
- "gix-date 0.8.4",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-commitgraph 0.24.2",
+ "gix-date 0.8.6",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
- "gix-ref 0.42.0",
- "gix-revwalk 0.12.0",
+ "gix-ref 0.44.1",
+ "gix-revwalk 0.13.1",
"gix-testtools",
"smallvec",
"thiserror",
@@ -2122,18 +2136,18 @@ dependencies = [
[[package]]
name = "gix-object"
-version = "0.41.1"
+version = "0.42.2"
dependencies = [
"bstr",
"criterion",
"document-features",
- "gix-actor 0.30.1",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
+ "gix-actor 0.31.2",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
"gix-testtools",
- "gix-utils 0.1.10",
- "gix-validate 0.8.3",
+ "gix-utils 0.1.12",
+ "gix-validate 0.8.5",
"itoa",
"pretty_assertions",
"serde",
@@ -2144,18 +2158,18 @@ dependencies = [
[[package]]
name = "gix-odb"
-version = "0.58.0"
+version = "0.61.0"
dependencies = [
"arc-swap",
"document-features",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-pack",
- "gix-path 0.10.6",
- "gix-quote 0.4.11",
+ "gix-path 0.10.7",
+ "gix-quote 0.4.12",
"parking_lot",
"serde",
"tempfile",
@@ -2166,12 +2180,13 @@ dependencies = [
name = "gix-odb-tests"
version = "0.0.0"
dependencies = [
+ "crossbeam-channel",
"filetime",
- "gix-actor 0.30.1",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-actor 0.31.2",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
"gix-pack",
"gix-testtools",
@@ -2181,20 +2196,20 @@ dependencies = [
[[package]]
name = "gix-pack"
-version = "0.48.0"
+version = "0.51.0"
dependencies = [
"clru",
"document-features",
- "gix-chunk 0.4.7",
+ "gix-chunk 0.4.8",
"gix-diff",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
- "gix-hashtable 0.5.1",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
- "gix-tempfile 13.1.0",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
+ "gix-hashtable 0.5.2",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
+ "gix-tempfile 14.0.0",
"gix-testtools",
- "gix-traverse 0.37.0",
+ "gix-traverse 0.39.1",
"memmap2 0.9.3",
"parking_lot",
"serde",
@@ -2208,20 +2223,20 @@ name = "gix-pack-tests"
version = "0.0.0"
dependencies = [
"bstr",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
"gix-pack",
"gix-testtools",
- "gix-traverse 0.37.0",
+ "gix-traverse 0.39.1",
"maplit",
"memmap2 0.9.3",
]
[[package]]
name = "gix-packetline"
-version = "0.17.3"
+version = "0.17.5"
dependencies = [
"async-std",
"bstr",
@@ -2229,10 +2244,10 @@ dependencies = [
"faster-hex",
"futures-io",
"futures-lite 2.1.0",
- "gix-hash 0.14.1",
+ "gix-hash 0.14.2",
"gix-odb",
"gix-pack",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"maybe-async",
"pin-project-lite",
"serde",
@@ -2241,12 +2256,12 @@ dependencies = [
[[package]]
name = "gix-packetline-blocking"
-version = "0.17.3"
+version = "0.17.4"
dependencies = [
"bstr",
"document-features",
"faster-hex",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"serde",
"thiserror",
]
@@ -2266,10 +2281,10 @@ dependencies = [
[[package]]
name = "gix-path"
-version = "0.10.6"
+version = "0.10.7"
dependencies = [
"bstr",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"home",
"once_cell",
"tempfile",
@@ -2278,14 +2293,14 @@ dependencies = [
[[package]]
name = "gix-pathspec"
-version = "0.7.0"
+version = "0.7.5"
dependencies = [
"bitflags 2.4.1",
"bstr",
- "gix-attributes 0.22.1",
+ "gix-attributes 0.22.2",
"gix-config-value",
- "gix-glob 0.16.1",
- "gix-path 0.10.6",
+ "gix-glob 0.16.3",
+ "gix-path 0.10.7",
"gix-testtools",
"once_cell",
"serial_test",
@@ -2294,7 +2309,7 @@ dependencies = [
[[package]]
name = "gix-prompt"
-version = "0.8.3"
+version = "0.8.5"
dependencies = [
"expectrl",
"gix-command",
@@ -2308,7 +2323,7 @@ dependencies = [
[[package]]
name = "gix-protocol"
-version = "0.44.1"
+version = "0.45.1"
dependencies = [
"async-std",
"async-trait",
@@ -2317,13 +2332,13 @@ dependencies = [
"futures-io",
"futures-lite 2.1.0",
"gix-credentials",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
"gix-packetline",
"gix-testtools",
"gix-transport",
- "gix-utils 0.1.10",
+ "gix-utils 0.1.12",
"maybe-async",
"serde",
"thiserror",
@@ -2343,10 +2358,10 @@ dependencies = [
[[package]]
name = "gix-quote"
-version = "0.4.11"
+version = "0.4.12"
dependencies = [
"bstr",
- "gix-utils 0.1.10",
+ "gix-utils 0.1.12",
"thiserror",
]
@@ -2377,21 +2392,21 @@ dependencies = [
[[package]]
name = "gix-ref"
-version = "0.42.0"
+version = "0.44.1"
dependencies = [
"document-features",
- "gix-actor 0.30.1",
- "gix-date 0.8.4",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-lock 13.1.0",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
- "gix-tempfile 13.1.0",
+ "gix-actor 0.31.2",
+ "gix-date 0.8.6",
+ "gix-features 0.38.2",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-lock 14.0.0",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
+ "gix-tempfile 14.0.0",
"gix-testtools",
- "gix-utils 0.1.10",
- "gix-validate 0.8.3",
+ "gix-utils 0.1.12",
+ "gix-validate 0.8.5",
"memmap2 0.9.3",
"serde",
"thiserror",
@@ -2402,48 +2417,48 @@ dependencies = [
name = "gix-ref-tests"
version = "0.0.0"
dependencies = [
- "gix-actor 0.30.1",
- "gix-date 0.8.4",
- "gix-discover 0.30.0",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-lock 13.1.0",
- "gix-object 0.41.1",
+ "gix-actor 0.31.2",
+ "gix-date 0.8.6",
+ "gix-discover 0.32.0",
+ "gix-features 0.38.2",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-lock 14.0.0",
+ "gix-object 0.42.2",
"gix-odb",
- "gix-ref 0.42.0",
+ "gix-ref 0.44.1",
"gix-testtools",
- "gix-validate 0.8.3",
+ "gix-validate 0.8.5",
]
[[package]]
name = "gix-refspec"
-version = "0.22.1"
+version = "0.23.0"
dependencies = [
"bstr",
- "gix-hash 0.14.1",
+ "gix-hash 0.14.2",
"gix-revision",
"gix-testtools",
- "gix-validate 0.8.3",
+ "gix-validate 0.8.5",
"smallvec",
"thiserror",
]
[[package]]
name = "gix-revision"
-version = "0.26.1"
+version = "0.27.1"
dependencies = [
"bstr",
"document-features",
- "gix-commitgraph 0.24.1",
- "gix-date 0.8.4",
- "gix-hash 0.14.1",
- "gix-hashtable 0.5.1",
- "gix-object 0.41.1",
+ "gix-commitgraph 0.24.2",
+ "gix-date 0.8.6",
+ "gix-hash 0.14.2",
+ "gix-hashtable 0.5.2",
+ "gix-object 0.42.2",
"gix-odb",
- "gix-revwalk 0.12.0",
+ "gix-revwalk 0.13.1",
"gix-testtools",
- "gix-trace 0.1.7",
+ "gix-trace 0.1.9",
"serde",
"thiserror",
]
@@ -2465,13 +2480,13 @@ dependencies = [
[[package]]
name = "gix-revwalk"
-version = "0.12.0"
+version = "0.13.1"
dependencies = [
- "gix-commitgraph 0.24.1",
- "gix-date 0.8.4",
- "gix-hash 0.14.1",
- "gix-hashtable 0.5.1",
- "gix-object 0.41.1",
+ "gix-commitgraph 0.24.2",
+ "gix-date 0.8.6",
+ "gix-hash 0.14.2",
+ "gix-hashtable 0.5.2",
+ "gix-object 0.42.2",
"smallvec",
"thiserror",
]
@@ -2490,11 +2505,11 @@ dependencies = [
[[package]]
name = "gix-sec"
-version = "0.10.5"
+version = "0.10.6"
dependencies = [
"bitflags 2.4.1",
"document-features",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"libc",
"serde",
"tempfile",
@@ -2507,19 +2522,22 @@ version = "0.0.0"
[[package]]
name = "gix-status"
-version = "0.6.0"
+version = "0.10.0"
dependencies = [
"bstr",
+ "document-features",
"filetime",
- "gix-features 0.38.0",
+ "gix-diff",
+ "gix-dir",
+ "gix-features 0.38.2",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
"gix-pathspec",
- "gix-worktree 0.31.0",
+ "gix-worktree 0.34.0",
"thiserror",
]
@@ -2529,25 +2547,31 @@ version = "0.0.0"
dependencies = [
"bstr",
"filetime",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
+ "gix-diff",
+ "gix-dir",
+ "gix-features 0.38.2",
+ "gix-filter",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
+ "gix-odb",
+ "gix-path 0.10.7",
"gix-pathspec",
"gix-status",
"gix-testtools",
- "gix-worktree 0.31.0",
+ "gix-worktree 0.34.0",
+ "pretty_assertions",
]
[[package]]
name = "gix-submodule"
-version = "0.9.0"
+version = "0.11.0"
dependencies = [
"bstr",
"gix-config",
- "gix-features 0.38.0",
- "gix-path 0.10.6",
+ "gix-features 0.38.2",
+ "gix-path 0.10.7",
"gix-pathspec",
"gix-refspec",
"gix-testtools",
@@ -2583,11 +2607,11 @@ dependencies = [
[[package]]
name = "gix-tempfile"
-version = "13.1.0"
+version = "14.0.0"
dependencies = [
"dashmap",
"document-features",
- "gix-fs 0.10.0",
+ "gix-fs 0.11.1",
"libc",
"once_cell",
"parking_lot",
@@ -2602,13 +2626,13 @@ version = "0.14.0"
dependencies = [
"bstr",
"crc",
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"fs_extra",
"gix-discover 0.26.0",
- "gix-fs 0.10.0",
+ "gix-fs 0.11.1",
"gix-ignore 0.8.0",
"gix-lock 10.0.0",
- "gix-tempfile 13.1.0",
+ "gix-tempfile 14.0.0",
"gix-worktree 0.26.0",
"io-close",
"is_ci",
@@ -2632,7 +2656,7 @@ checksum = "b686a35799b53a9825575ca3f06481d0a053a409c4d97ffcf5ddd67a8760b497"
[[package]]
name = "gix-trace"
-version = "0.1.7"
+version = "0.1.9"
dependencies = [
"document-features",
"tracing-core",
@@ -2640,11 +2664,11 @@ dependencies = [
[[package]]
name = "gix-transport"
-version = "0.41.1"
+version = "0.42.1"
dependencies = [
"async-std",
"async-trait",
- "base64 0.21.5",
+ "base64 0.22.1",
"blocking",
"bstr",
"curl",
@@ -2653,12 +2677,12 @@ dependencies = [
"futures-lite 2.1.0",
"gix-command",
"gix-credentials",
- "gix-features 0.38.0",
- "gix-hash 0.14.1",
+ "gix-features 0.38.2",
+ "gix-hash 0.14.2",
"gix-pack",
"gix-packetline",
- "gix-quote 0.4.11",
- "gix-sec 0.10.5",
+ "gix-quote 0.4.12",
+ "gix-sec 0.10.6",
"gix-url",
"maybe-async",
"pin-project-lite",
@@ -2685,14 +2709,15 @@ dependencies = [
[[package]]
name = "gix-traverse"
-version = "0.37.0"
+version = "0.39.1"
dependencies = [
- "gix-commitgraph 0.24.1",
- "gix-date 0.8.4",
- "gix-hash 0.14.1",
- "gix-hashtable 0.5.1",
- "gix-object 0.41.1",
- "gix-revwalk 0.12.0",
+ "bitflags 2.4.1",
+ "gix-commitgraph 0.24.2",
+ "gix-date 0.8.6",
+ "gix-hash 0.14.2",
+ "gix-hashtable 0.5.2",
+ "gix-object 0.42.2",
+ "gix-revwalk 0.13.1",
"smallvec",
"thiserror",
]
@@ -2701,12 +2726,12 @@ dependencies = [
name = "gix-traverse-tests"
version = "0.0.0"
dependencies = [
- "gix-commitgraph 0.24.1",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-commitgraph 0.24.2",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
"gix-testtools",
- "gix-traverse 0.37.0",
+ "gix-traverse 0.39.1",
]
[[package]]
@@ -2715,13 +2740,13 @@ version = "0.0.0"
[[package]]
name = "gix-url"
-version = "0.27.1"
+version = "0.27.3"
dependencies = [
"assert_matches",
"bstr",
"document-features",
- "gix-features 0.38.0",
- "gix-path 0.10.6",
+ "gix-features 0.38.2",
+ "gix-path 0.10.7",
"gix-testtools",
"home",
"serde",
@@ -2735,15 +2760,15 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f82c41937f00e15a1f6cb0b55307f0ca1f77f4407ff2bf440be35aa688c6a3e"
dependencies = [
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
]
[[package]]
name = "gix-utils"
-version = "0.1.10"
+version = "0.1.12"
dependencies = [
"bstr",
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"unicode-normalization",
]
@@ -2759,7 +2784,7 @@ dependencies = [
[[package]]
name = "gix-validate"
-version = "0.8.3"
+version = "0.8.5"
dependencies = [
"bstr",
"gix-testtools",
@@ -2786,36 +2811,37 @@ dependencies = [
[[package]]
name = "gix-worktree"
-version = "0.31.0"
+version = "0.34.0"
dependencies = [
"bstr",
"document-features",
- "gix-attributes 0.22.1",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-glob 0.16.1",
- "gix-hash 0.14.1",
- "gix-ignore 0.11.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
+ "gix-attributes 0.22.2",
+ "gix-features 0.38.2",
+ "gix-fs 0.11.1",
+ "gix-glob 0.16.3",
+ "gix-hash 0.14.2",
+ "gix-ignore 0.11.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
+ "gix-validate 0.8.5",
"serde",
]
[[package]]
name = "gix-worktree-state"
-version = "0.8.0"
+version = "0.11.0"
dependencies = [
"bstr",
- "gix-features 0.38.0",
+ "gix-features 0.38.2",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-glob 0.16.1",
- "gix-hash 0.14.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
- "gix-path 0.10.6",
- "gix-worktree 0.31.0",
+ "gix-fs 0.11.1",
+ "gix-glob 0.16.3",
+ "gix-hash 0.14.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
+ "gix-path 0.10.7",
+ "gix-worktree 0.34.0",
"io-close",
"thiserror",
]
@@ -2824,13 +2850,13 @@ dependencies = [
name = "gix-worktree-state-tests"
version = "0.0.0"
dependencies = [
- "gix-discover 0.30.0",
- "gix-features 0.38.0",
+ "gix-discover 0.32.0",
+ "gix-features 0.38.2",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
"gix-odb",
"gix-testtools",
"gix-worktree-state",
@@ -2841,19 +2867,19 @@ dependencies = [
[[package]]
name = "gix-worktree-stream"
-version = "0.10.0"
+version = "0.13.0"
dependencies = [
- "gix-attributes 0.22.1",
- "gix-features 0.38.0",
+ "gix-attributes 0.22.2",
+ "gix-features 0.38.2",
"gix-filter",
- "gix-fs 0.10.0",
- "gix-hash 0.14.1",
- "gix-object 0.41.1",
+ "gix-fs 0.11.1",
+ "gix-hash 0.14.2",
+ "gix-object 0.42.2",
"gix-odb",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"gix-testtools",
- "gix-traverse 0.37.0",
- "gix-worktree 0.31.0",
+ "gix-traverse 0.39.1",
+ "gix-worktree 0.34.0",
"parking_lot",
"thiserror",
]
@@ -2863,19 +2889,19 @@ name = "gix-worktree-tests"
version = "0.0.0"
dependencies = [
"bstr",
- "gix-attributes 0.22.1",
- "gix-discover 0.30.0",
- "gix-features 0.38.0",
- "gix-fs 0.10.0",
- "gix-glob 0.16.1",
- "gix-hash 0.14.1",
- "gix-ignore 0.11.1",
- "gix-index 0.30.0",
- "gix-object 0.41.1",
+ "gix-attributes 0.22.2",
+ "gix-discover 0.32.0",
+ "gix-features 0.38.2",
+ "gix-fs 0.11.1",
+ "gix-glob 0.16.3",
+ "gix-hash 0.14.2",
+ "gix-ignore 0.11.2",
+ "gix-index 0.33.0",
+ "gix-object 0.42.2",
"gix-odb",
- "gix-path 0.10.6",
+ "gix-path 0.10.7",
"gix-testtools",
- "gix-worktree 0.31.0",
+ "gix-worktree 0.34.0",
"symlink",
]
@@ -2899,9 +2925,9 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.3.24"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"
+checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069"
dependencies = [
"bytes",
"fnv",
@@ -2940,9 +2966,9 @@ dependencies = [
[[package]]
name = "hashlink"
-version = "0.8.4"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"
+checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af"
dependencies = [
"hashbrown 0.14.3",
]
@@ -2969,35 +2995,36 @@ dependencies = [
]
[[package]]
-name = "hostname"
-version = "0.3.1"
+name = "http"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
dependencies = [
- "libc",
- "match_cfg",
- "winapi",
+ "bytes",
+ "fnv",
+ "itoa",
]
[[package]]
-name = "http"
-version = "0.2.11"
+name = "http-body"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
+checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
dependencies = [
"bytes",
- "fnv",
- "itoa",
+ "http",
]
[[package]]
-name = "http-body"
-version = "0.4.6"
+name = "http-body-util"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
+checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d"
dependencies = [
"bytes",
+ "futures-core",
"http",
+ "http-body",
"pin-project-lite",
]
@@ -3007,12 +3034,6 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
-[[package]]
-name = "httpdate"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
-
[[package]]
name = "human_format"
version = "1.0.3"
@@ -3027,63 +3048,75 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.28"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
+checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a"
dependencies = [
"bytes",
"futures-channel",
- "futures-core",
"futures-util",
"h2",
"http",
"http-body",
"httparse",
- "httpdate",
"itoa",
"pin-project-lite",
- "socket2 0.5.5",
+ "smallvec",
"tokio",
- "tower-service",
- "tracing",
"want",
]
[[package]]
name = "hyper-rustls"
-version = "0.24.2"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
+checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
dependencies = [
"futures-util",
"http",
"hyper",
- "rustls 0.21.10",
+ "hyper-util",
+ "rustls 0.22.4",
+ "rustls-pki-types",
"tokio",
"tokio-rustls",
+ "tower-service",
]
[[package]]
name = "hyper-tls"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
dependencies = [
"bytes",
+ "http-body-util",
"hyper",
+ "hyper-util",
"native-tls",
"tokio",
"tokio-native-tls",
+ "tower-service",
]
[[package]]
-name = "idna"
-version = "0.4.0"
+name = "hyper-util"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
+checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "pin-project-lite",
+ "socket2 0.5.5",
+ "tokio",
+ "tower",
+ "tower-service",
+ "tracing",
]
[[package]]
@@ -3152,18 +3185,6 @@ dependencies = [
"windows-sys 0.48.0",
]
-[[package]]
-name = "ipconfig"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
-dependencies = [
- "socket2 0.5.5",
- "widestring",
- "windows-sys 0.48.0",
- "winreg",
-]
-
[[package]]
name = "ipnet"
version = "2.9.0"
@@ -3206,6 +3227,12 @@ version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb"
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
+
[[package]]
name = "itertools"
version = "0.10.5"
@@ -3288,9 +3315,9 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libsqlite3-sys"
-version = "0.27.0"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
+checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
dependencies = [
"cc",
"pkg-config",
@@ -3320,12 +3347,6 @@ dependencies = [
"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.3.8"
@@ -3354,11 +3375,17 @@ 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.20"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
dependencies = [
"value-bag",
]
@@ -3372,15 +3399,6 @@ dependencies = [
"hashbrown 0.14.3",
]
-[[package]]
-name = "lru-cache"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
-dependencies = [
- "linked-hash-map",
-]
-
[[package]]
name = "lzma-sys"
version = "0.1.20"
@@ -3398,12 +3416,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
-[[package]]
-name = "match_cfg"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
-
[[package]]
name = "maybe-async"
version = "0.2.7"
@@ -3417,9 +3429,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.1"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
[[package]]
name = "memmap2"
@@ -3465,9 +3477,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.10"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
+checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"log",
@@ -3525,6 +3537,12 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-traits"
version = "0.2.17"
@@ -3703,6 +3721,26 @@ version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+[[package]]
+name = "pin-project"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.47",
+]
+
[[package]]
name = "pin-project-lite"
version = "0.2.13"
@@ -3722,7 +3760,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4"
dependencies = [
"atomic-waker",
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"futures-io",
]
@@ -3796,12 +3834,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
-[[package]]
-name = "ppv-lite86"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
-
[[package]]
name = "pretty_assertions"
version = "1.4.0"
@@ -3870,12 +3902,6 @@ dependencies = [
"nix",
]
-[[package]]
-name = "quick-error"
-version = "1.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
-
[[package]]
name = "quote"
version = "1.0.35"
@@ -3885,36 +3911,6 @@ dependencies = [
"proc-macro2",
]
-[[package]]
-name = "rand"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
-dependencies = [
- "libc",
- "rand_chacha",
- "rand_core",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
-dependencies = [
- "ppv-lite86",
- "rand_core",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
-dependencies = [
- "getrandom",
-]
-
[[package]]
name = "ratatui"
version = "0.25.0"
@@ -3994,21 +3990,24 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "reqwest"
-version = "0.11.23"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41"
+checksum = "58b48d98d932f4ee75e541614d32a7f44c889b72bd9c2e04d95edd135989df88"
dependencies = [
"base64 0.21.5",
"bytes",
"encoding_rs",
+ "futures-channel",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
+ "http-body-util",
"hyper",
"hyper-rustls",
"hyper-tls",
+ "hyper-util",
"ipnet",
"js-sys",
"log",
@@ -4017,17 +4016,18 @@ dependencies = [
"once_cell",
"percent-encoding",
"pin-project-lite",
- "rustls 0.21.10",
+ "rustls 0.22.4",
"rustls-pemfile 1.0.4",
+ "rustls-pki-types",
"serde",
"serde_json",
"serde_urlencoded",
+ "sync_wrapper",
"system-configuration",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tower-service",
- "trust-dns-resolver",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -4036,16 +4036,6 @@ dependencies = [
"winreg",
]
-[[package]]
-name = "resolv-conf"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00"
-dependencies = [
- "hostname",
- "quick-error",
-]
-
[[package]]
name = "ring"
version = "0.16.20"
@@ -4077,9 +4067,9 @@ dependencies = [
[[package]]
name = "rusqlite"
-version = "0.30.0"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d"
+checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae"
dependencies = [
"bitflags 2.4.1",
"fallible-iterator",
@@ -4136,14 +4126,16 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.21.10"
+version = "0.22.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba"
+checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
dependencies = [
"log",
"ring 0.17.7",
+ "rustls-pki-types",
"rustls-webpki",
- "sct",
+ "subtle",
+ "zeroize",
]
[[package]]
@@ -4179,13 +4171,20 @@ dependencies = [
"base64 0.21.5",
]
+[[package]]
+name = "rustls-pki-types"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8"
+
[[package]]
name = "rustls-webpki"
-version = "0.101.7"
+version = "0.102.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
+checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610"
dependencies = [
"ring 0.17.7",
+ "rustls-pki-types",
"untrusted 0.9.0",
]
@@ -4210,6 +4209,15 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "scc"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc"
+dependencies = [
+ "sdd",
+]
+
[[package]]
name = "schannel"
version = "0.1.23"
@@ -4235,6 +4243,12 @@ dependencies = [
"untrusted 0.9.0",
]
+[[package]]
+name = "sdd"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d"
+
[[package]]
name = "security-framework"
version = "2.9.2"
@@ -4303,23 +4317,23 @@ dependencies = [
[[package]]
name = "serial_test"
-version = "2.0.0"
+version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d"
+checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d"
dependencies = [
- "dashmap",
"futures",
- "lazy_static",
"log",
+ "once_cell",
"parking_lot",
+ "scc",
"serial_test_derive",
]
[[package]]
name = "serial_test_derive"
-version = "2.0.0"
+version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
+checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67"
dependencies = [
"proc-macro2",
"quote",
@@ -4398,6 +4412,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
[[package]]
name = "slab"
version = "0.4.9"
@@ -4409,9 +4429,9 @@ dependencies = [
[[package]]
name = "smallvec"
-version = "1.11.2"
+version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
dependencies = [
"serde",
]
@@ -4492,6 +4512,12 @@ dependencies = [
"syn 2.0.47",
]
+[[package]]
+name = "subtle"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
+
[[package]]
name = "symlink"
version = "0.1.0"
@@ -4520,6 +4546,12 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "sync_wrapper"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+
[[package]]
name = "sysinfo"
version = "0.30.2"
@@ -4573,7 +4605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"
dependencies = [
"cfg-if",
- "fastrand 2.0.1",
+ "fastrand 2.1.0",
"rustix 0.38.31",
"windows-sys 0.52.0",
]
@@ -4629,13 +4661,14 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.31"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
"libc",
+ "num-conv",
"num_threads",
"powerfmt",
"serde",
@@ -4651,10 +4684,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.16"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]
@@ -4711,11 +4745,12 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.24.1"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
dependencies = [
- "rustls 0.21.10",
+ "rustls 0.22.4",
+ "rustls-pki-types",
"tokio",
]
@@ -4735,9 +4770,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.5"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
[[package]]
name = "toml_edit"
@@ -4750,6 +4785,28 @@ dependencies = [
"winnow 0.5.40",
]
+[[package]]
+name = "tower"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project",
+ "pin-project-lite",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
+
[[package]]
name = "tower-service"
version = "0.3.2"
@@ -4762,6 +4819,7 @@ version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
+ "log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -4826,52 +4884,6 @@ dependencies = [
"tracing-log",
]
-[[package]]
-name = "trust-dns-proto"
-version = "0.23.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374"
-dependencies = [
- "async-trait",
- "cfg-if",
- "data-encoding",
- "enum-as-inner",
- "futures-channel",
- "futures-io",
- "futures-util",
- "idna 0.4.0",
- "ipnet",
- "once_cell",
- "rand",
- "smallvec",
- "thiserror",
- "tinyvec",
- "tokio",
- "tracing",
- "url",
-]
-
-[[package]]
-name = "trust-dns-resolver"
-version = "0.23.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6"
-dependencies = [
- "cfg-if",
- "futures-util",
- "ipconfig",
- "lru-cache",
- "once_cell",
- "parking_lot",
- "rand",
- "resolv-conf",
- "smallvec",
- "thiserror",
- "tokio",
- "tracing",
- "trust-dns-proto",
-]
-
[[package]]
name = "try-lock"
version = "0.2.5"
@@ -4922,9 +4934,9 @@ dependencies = [
[[package]]
name = "unicode-bidi"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416"
+checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
[[package]]
name = "unicode-bom"
@@ -4973,12 +4985,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.0"
+version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
+checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [
"form_urlencoded",
- "idna 0.5.0",
+ "idna",
"percent-encoding",
]
@@ -4996,9 +5008,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "value-bag"
-version = "1.4.2"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe"
+checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101"
[[package]]
name = "vcpkg"
@@ -5131,15 +5143,12 @@ dependencies = [
[[package]]
name = "webpki-roots"
-version = "0.25.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10"
-
-[[package]]
-name = "widestring"
-version = "1.0.2"
+version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
+checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009"
+dependencies = [
+ "rustls-pki-types",
+]
[[package]]
name = "winapi"
@@ -5472,15 +5481,40 @@ dependencies = [
"syn 2.0.47",
]
+[[package]]
+name = "zeroize"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+
[[package]]
name = "zip"
-version = "0.6.6"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
+checksum = "e2568cd0f20e86cd9a7349fe05178f7bd22f22724678448ae5a9bac266df2689"
dependencies = [
- "byteorder",
+ "arbitrary",
"crc32fast",
"crossbeam-utils",
+ "displaydoc",
"flate2",
+ "indexmap",
+ "memchr",
+ "thiserror",
"time",
+ "zopfli",
+]
+
+[[package]]
+name = "zopfli"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "lockfree-object-pool",
+ "log",
+ "once_cell",
+ "simd-adler32",
]
diff --git a/Cargo.toml b/Cargo.toml
index 4116d7bd39e..e36d81ab687 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,7 +5,7 @@ repository = "https://github.com/Byron/gitoxide"
authors = ["Sebastian Thiel "]
edition = "2021"
license = "MIT OR Apache-2.0"
-version = "0.34.0"
+version = "0.36.1"
default-run = "gix"
include = ["src/**/*", "LICENSE-*", "README.md"]
resolver = "2"
@@ -42,29 +42,29 @@ max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl
## transports as it 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/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client" ]
+max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "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-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex" ]
+max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex"]
## All of the good stuff, with less fanciness for smaller binaries.
##
## As fast as possible, progress line rendering, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output.
-lean = ["fast", "tracing", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line" ]
+lean = ["fast", "tracing", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line"]
## The smallest possible build, best suitable for small single-core machines.
##
## 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/rustsha1", "gix-features/zlib-rust-backend", "prodash-render-line", "is-terminal" ]
+small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "prodash-render-line", "is-terminal"]
## Like lean, but uses Rusts async implementations for networking.
##
## This build is more of a demonstration showing how async can work with `gitoxide`, which generally is blocking. This also means that the selection of async transports
## is very limited to only HTTP (without typical `git` configuration) and git over TCP like provided by the `git daemon`.
##
-## As fast as possible, progress line rendering, less feature-ful HTTP (pure Rust) and only `git-damon` support, all `ein` tools, CLI colors and local-time support, JSON output.
+## As fast as possible, progress line rendering, less featureful HTTP (pure Rust) and only `git-daemon` support, all `ein` tools, CLI colors and local-time support, JSON output.
##
## Due to async client-networking not being implemented for most transports, this one supports only the 'git+tcp' and HTTP transport.
## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports.
@@ -107,12 +107,12 @@ fast = ["gix/max-performance", "gix/comfort"]
fast-safe = ["gix/max-performance-safe", "gix/comfort"]
## Enable tracing in `gitoxide-core`.
-tracing = ["dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing", "gix-features/tracing", "gix-features/tracing-detail" ]
+tracing = ["dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing", "gix-features/tracing", "gix-features/tracing-detail"]
## Use `clap` 3.0 to build the prettiest, best documented and most user-friendly CLI at the expense of binary size.
## Provides a terminal user interface for detailed and exhaustive progress.
## Provides a line renderer for leaner progress display, without the need for a full-blown TUI.
-pretty-cli = [ "gitoxide-core/serde", "prodash/progress-tree", "prodash/progress-tree-log", "prodash/local-time", "env_logger/humantime", "env_logger/color", "env_logger/auto-color" ]
+pretty-cli = ["gitoxide-core/serde", "prodash/progress-tree", "prodash/progress-tree-log", "prodash/local-time", "env_logger/humantime", "env_logger/color", "env_logger/auto-color"]
## The `--verbose` flag will be powered by an interactive progress mechanism that doubles as log as well as interactive progress
## that appears after a short duration.
@@ -168,9 +168,9 @@ gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"]
[dependencies]
anyhow = "1.0.42"
-gitoxide-core = { version = "^0.36.0", path = "gitoxide-core" }
-gix-features = { version = "^0.38.0", path = "gix-features" }
-gix = { version = "^0.59.0", path = "gix", default-features = false }
+gitoxide-core = { version = "^0.38.0", path = "gitoxide-core" }
+gix-features = { version = "^0.38.2", path = "gix-features" }
+gix = { version = "^0.63.0", path = "gix", default-features = false }
time = "0.3.23"
clap = { version = "4.1.1", features = ["derive", "cargo"] }
@@ -285,9 +285,7 @@ members = [
"gix-worktree-stream",
"gix-revwalk",
"gix-fsck",
-
"tests/tools",
-
"gix-diff/tests",
"gix-pack/tests",
"gix-odb/tests",
@@ -304,6 +302,8 @@ members = [
prodash = { version = "28.0.0", default-features = false }
futures-lite = { version = "2.1.0", default-features = false, features = ["std"] }
faster-hex = { version = "0.9.0", default-features = false }
+reqwest = { version = "0.12.0", default-features = false, features = ["charset", "http2", "macos-system-configuration"] } # all but the 'default-tls' feature
+curl = { version = "0.4" }
[package.metadata.docs.rs]
features = ["document-features", "max"]
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index b9d3ee59593..72b2a861ac0 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -1,6 +1,6 @@
# Development Guide
-## Practices
+## Practices
* **test-first development**
* protect against regression and make implementing features easy.
@@ -9,12 +9,12 @@
for the mundane things, like unhappy code paths.
* *use git itself* as reference implementation, and use their test-cases and fixtures where
appropriate. At the very least, try to learn from them.
- * Run the same test against git whenever feasible to assure git agrees with our implementation.
+ * Run the same test against git whenever feasible to assure git agrees with our implementation.
See `gix-glob` for examples.
* *use libgit2* test fixtures and cases where appropriate, or learn from them.
* **safety first**
* handle all errors, never `unwrap()`. If needed, `expect("why")`.
- * provide an error chain and make it easy to understand what went wrong.
+ * provide an error chain and make it easy to understand what went wrong.
* We `thiserror` generally.
* Adhere to the [stability guide](https://github.com/Byron/gitoxide/blob/main/STABILITY.md)
@@ -28,10 +28,10 @@ The _subject_ usually informs about the *what* and the body provides details and
Commit messages _must_ show up in the changelog in case of breaking changes. Examples for that are:
- change!: rename `Foo` to `Bar`. (#123)
-
+
And this is why we do it in the body.
- remove!: `Repository::obsolete()`.
-
+
Nobody used this method.
Features or other changes that are visible and people should know about look like this:
@@ -48,7 +48,7 @@ Examples could be:
- `make fmt`
- thanks clippy
-Please refrain from using `chore:` or `refactor:` prefixes as for the most part, users of the API don't care about those. When a `refactor`
+Please refrain from using `chore:` or `refactor:` prefixes as for the most part, users of the API don't care about those. When a `refactor`
changes the API in some way, prefer to use `feat`, `change`, `rename` or `remove` instead, and most of the time the ones that are not `feat`
are breaking so would be seen with their _exclamation mark_ suffix, like `change!`.
@@ -63,20 +63,20 @@ Knowing that `cargo smart-release` is driven by commit messages and affects thei
to split edits into multiple commits to clearly indicate which crate is actually broken.
Typical patterns include making a breaking change in one crate and then fix all others to work with it. For changelogs to look proper
-and version bumps to be correct, the first commit would contain only the breaking changes themselves,
+and version bumps to be correct, the first commit would contain only the breaking changes themselves,
like "rename: `foo()` to `bar()`", and the second commit would contain all changes to adapt to that and look like "adapt to changes in ``".
## Commit History
-We generally follow a 'track everything' approach and there is a lot of freedom leading to more commits rather than less. There
+We generally follow a 'track everything' approach and there is a lot of freedom leading to more commits rather than less. There
is no obligation to squash commits or to otherwise tune the history.
We use feature branches and PRs most of the time to be able to take advantage of CI and GitHub review tools, and merge with merge commits
-to make individual efforts stand out. There is no need for linearizing history or tuning it in any other way. However, each commit
+to make individual efforts stand out. There is no need for linearizing history or tuning it in any other way. However, each commit
_must_ follow the guidelines laid out in the `Commit Messages` paragraph.
There is value in organizing commits by topic and [_Stacked Git_](https://stacked-git.github.io) is hereby endorsed to do that.
-
+
## Configuration and overrides
As a general rule, respect and implement all applicable [git-config](https://git-scm.com/docs/git-config) by default, but allow the
@@ -102,11 +102,11 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
* **User Interfaces**
* User interfaces can greatly benefit from using async as it's much easier to maintain a responsive UI thread that way thanks
to the wonderful future combinators.
- * `blocking` can be used to make `Read` and `Iterator` async, or move any operation onto a thread which blends it into the
- async world.
+ * `blocking` can be used to make `Read` and `Iterator` async, or move any operation onto a thread which blends it into the
+ async world.
* Most operations are fast and 'interrupting' them is as easy as ignoring their result by cancelling their task.
* Long-running operations can be roughly interacted with using `gix_features::interrupt::trigger()` function, and after a moment
- of waiting the flag can be unset with the `…::uninterrupt()` function to allow new long-running operations to work.
+ of waiting the flag can be unset with the `…::uninterrupt()` function to allow new long-running operations to work.
Every long running operation supports this.
* **server-side**
* ~~Building a pack is CPU and at some point, IO bound, and it makes no sense to use async to handle more connections - git
@@ -119,7 +119,7 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
* **Why not use it to generate blocking versions of traits automatically?**
* This would require `maybe_async` and its dependencies to always be present, increasing compile times. For now we chose a little more code to handle
over increasing compile times for everyone. This stance may change later once compile times don't matter that much anymore to allow the removal of code.
-
+
* **`Default` trait implementations**
* These can change only if the effect is contained within the callers process.
This means **changing the default of a file version** is a **breaking change**.
@@ -127,7 +127,7 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
* When receiving a `Progress` implementation
* without calling `add_child(…)` then use it directly to communicate progress, leaving
control of the name to the caller. However, call `.init(…)` to configure the iteration.
- * and when calling `add_child(…)` don't use the parent progress instance for anything else.
+ * and when calling `add_child(…)` don't use the parent progress instance for anything else.
* **interruption of long-running operations**
* Use `gix-features::interrupt::*` for building support for interruptions of long-running operations only.
* It's up to the author to decide how to best integrate it, generally we use a poll-based mechanism to check whether
@@ -136,9 +136,9 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
* …temporary resources like files might otherwise be leaked.
* **this is optional but desirable if…**
* …there is no leakage otherwise to support user interfaces. They background long-running operations and need them to be cancellable.
-
+
* **prepare for SHA256 support by using `gix_hash::ObjectId` and `gix_hash::oid`**
- * eventually there will be the need to support both Sha1 and Sha256. We anticipate it by using the `Id` type instead
+ * eventually there will be the need to support both Sha1 and Sha256. We anticipate it by using the `Id` type instead
of slices or arrays of 20 bytes. This way, eventually we can support multiple hash digest sizes.
* Right now it's unclear how Sha256 is going to work in git, so we only support Sha1 for now. It might be an avenue to proactively
implement it ahead of time once there is a specification to follow.
@@ -166,7 +166,7 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
- Assuming UTF8-ish bytes in paths produced by `git` even on windows due to `MSYS2`, we use `os_str_bytes` to convert these back into `OsStr` and derivatives like `Path`
as needed even though it might not always be the case depending on the actual encoding used by `MSYS2` or other abstraction layers, or avoiding to use std types altogether
using our own instead.
-
+
## Sha256
A bunch of notes collected to keep track of what's needed to eventually support it
@@ -181,7 +181,7 @@ A bunch of notes collected to keep track of what's needed to eventually support
* don't use unwrap, not even in tests. Instead use `quick_error!()` or `Box`.
* Use `expect(…)` as assertion on Options, providing context on *why* the expectations should hold. Or in other words,
answer "This should work _because_…"
-
+
## `Options` vs `Context`
- Use `Options` whenever there is something to configure in terms of branching behaviour. It can be defaulted, and if it can't these fields should be parameters of the method
@@ -195,7 +195,7 @@ In _plumbing_ crates, prefer to default to keeping references if this is feasibl
In _porcelain_ crates, like `gix`, we have `Platforms` which are typically cheap enough to create on demand as they configure one or more method calls. These
should keep a reference to the `Repository` instance that created them as the user is expected to clone the `Repository` if there is the need.
However, if these structures are more expensive, call them `Cache` or `` and prefer to clone the `Repository` into them or otherwise keep them free of lifetimes
-to allow the user to keep this structure around for repeated calls. References for this paragraph are [this PR](https://github.com/Canop/bacon/pull/98) and
+to allow the user to keep this structure around for repeated calls. References for this paragraph are [this PR](https://github.com/Canop/bacon/pull/98) and
[this discussion](https://github.com/Byron/gitoxide/discussions/675).
## Examples, Porcelain CLI and Plumbing CLI - which does what?
@@ -240,12 +240,12 @@ by humans.
* make it compile quickly, so no extras
* **Examples**
* An implementation of ideas for actual occasional use and the first step towards getting integrated into Porcelain or Plumbing CLIs.
- * Proper command-line parsing with Clap.
- * No tests or progress.
- * High quality Rust code along with idiomatic `gitoxide` usage so people can learn from it.
-* **Plumbing CLI**
+ * Proper command-line parsing with Clap.
+ * No tests or progress.
+ * High quality Rust code along with idiomatic `gitoxide` usage so people can learn from it.
+* **Plumbing CLI**
* Use Clap AND Argh for command-line parsing via feature toggles to allow for tiny builds as plumbing is mostly for scripts.
- * Journey tests
+ * Journey tests
* Progress can be turned on using the `--verbose` flag, quiet by default.
* Examples can be turned into plumbing by adding journey tests and `argh` command-line parsing, as well as progress.
* **Porcelain CLI**
@@ -262,9 +262,8 @@ get an overview.
## Reviewing PRs
-- be sure to clone locally and run tests with `GITOXIDE_TEST_IGNORE_ARCHIVES=1` to assure new fixture scripts (if there are any) are validated
- on _MacOS_ and _Windows_. Note that linux doesn't need to be tested that way as CI on linux ignores them by merit of not checking them out
- via `gix-lfs`.
+- Be sure to clone locally and run tests with `GIX_TEST_IGNORE_ARCHIVES=1` to assure new fixture scripts (if there are any) are validated
+ on _MacOS_ and _Windows_. Linux doesn't need to be tested locally that way, as CI on Linux includes it.
## Creating a release
@@ -309,5 +308,5 @@ GIT_SSH_COMMAND="ssh -VVV" \
git
```
-Consider adding `GIT_TRACE2_PERF=1` (possibly add `GIT_TRACE2_PERF_BRIEF=1` for brevity) as well for statistics and variables
+Consider adding `GIT_TRACE2_PERF=1` (possibly add `GIT_TRACE2_PERF_BRIEF=1` for brevity) as well for statistics and variables
(see [their source for more](https://github.com/git/git/blob/b50a608ba20348cb3dfc16a696816d51780e3f0f/trace2/tr2_sysenv.c#L50).
diff --git a/README.md b/README.md
index 7a2f98189d6..1b6e9b19d89 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-[![Rust](https://github.com/Byron/gitoxide/workflows/Rust/badge.svg)](https://github.com/Byron/gitoxide/actions)
+[![CI](https://github.com/Byron/gitoxide/workflows/ci/badge.svg)](https://github.com/Byron/gitoxide/actions)
[![Crates.io](https://img.shields.io/crates/v/gitoxide.svg)](https://crates.io/crates/gitoxide)
`gitoxide` is an implementation of `git` written in Rust for developing future-proof applications which strive for correctness and
-performance while providing a pleasant and unsurprising developer experience.
+performance while providing a pleasant and unsurprising developer experience.
`gitoxide` provides the `gix` and `ein` binaries for use on the command-line to allow experimentation with key features
-like `fetch` and `clone`, and to validate the usability and control of the API offered by the [`gix`] crate.
+like `fetch` and `clone`, and to validate the usability and control of the API offered by the [`gix`] crate.
`gitoxide` aspires to be a production-grade server implementation and the `ein` binary aspires to become the default way to interact with git repositories.
@@ -16,10 +16,10 @@ like `fetch` and `clone`, and to validate the usability and control of the API o
## Development Status
-The command-line tools as well as the status of each crate is described in
+The command-line tools as well as the status of each crate is described in
[the crate status document](https://github.com/Byron/gitoxide/blob/main/crate-status.md).
-For use in applications, look for the [`gix`](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix) crate,
+For use in applications, look for the [`gix`](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix) crate,
which serves as entrypoint to the functionality provided by various lower-level plumbing crates like
[`gix-config`](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-config).
@@ -66,10 +66,10 @@ Follow linked crate name for detailed status. Please note that all crates follow
* **Stability Tier 1**
- [gix-lock](https://github.com/Byron/gitoxide/blob/main/gix-lock/README.md)
-
+
* **Stability Tier 2**
- [gix-tempfile](https://github.com/Byron/gitoxide/blob/main/gix-tempfile/README.md)
-
+
### Stabilization Candidates
Crates that seem feature complete and need to see some more use before they can be released as 1.0.
@@ -144,13 +144,13 @@ is usable to some extent.
* [gix-tix](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-tix)
* [gix-bundle](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-bundle)
* [gix-fsck](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-fsck)
-
+
### Stress Testing
* [x] Verify huge packs
- * [x] Explode a pack to disk
+ * [x] Explode a pack to disk
* [x] Generate and verify large commit graphs
* [ ] Generate huge pack from a lot of loose objects
-
+
### Stability and MSRV
Our [stability guide] helps to judge how much churn can be expected when depending on crates in this workspace.
@@ -161,7 +161,7 @@ Our [stability guide] helps to judge how much churn can be expected when dependi
### Download a Binary Release
-Using `cargo binstall`, one is able to fetch [binary releases][releases]. You can install it via `cargo install cargo-binstall`, assuming
+Using `cargo binstall`, one is able to fetch [binary releases][releases]. You can install it via `cargo install cargo-binstall`, assuming
the [rust toolchain][rustup] is present.
Then install gitoxide with `cargo binstall gitoxide`.
@@ -178,6 +178,14 @@ For Arch Linux you can download `gitoxide` from `community` repository:
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:
+```
+cave resolve -x repository/rust
+cave resolve -x gitoxide
+```
+
### From Source via Cargo
`cargo` is the Rust package manager which can easily be obtained through [rustup]. With it, you can build your own binary
@@ -192,7 +200,7 @@ for packagers who need to tune external dependencies.
```
# A certain 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
+cargo install gitoxide --locked --no-default-features --features max-pure
# The default installation, 'max', is the fastest, but also needs some libraries available to build successfully.
# Installing these is platform-dependent and thus can't be explained here.
@@ -218,8 +226,41 @@ 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/Byron/gitoxide/issues/592)).
+-
+### Using Docker
+
+Some CI/CD pipelines leverage repository cloning. Below is a copy-paste-able example to build docker images for such workflows.
+As no official image exists (at this time), an image must first be built.
+
+> [!NOTE]
+> The dockerfile isn't continuously tested as it costs too much time and thus might already be broken.
+> PRs are welcome.
+
+#### Building the most compatible base image
+
+```sh
+docker build -f etc/docker/Dockerfile.alpine -t gitoxide:latest --compress . --target=pipeline
+```
+
+#### Basic usage in a Pipeline
+
+For example, if a `Dockerfile` currently uses something like `RUN git clone https://github.com/Byron/gitoxide`, first build the image:
-[releases]: https://github.com/Byron/gitoxide/releases
+```sh
+docker build -f etc/docker/Dockerfile.alpine -t gitoxide:latest --compress .
+```
+
+Then copy the binaries into your image and replace the `git` directive with a `gix` equivalent.
+
+```dockerfile
+COPY --from gitoxide:latest /bin/gix /usr/local/bin/
+COPY --from gitoxide:latest /bin/ein /usr/local/bin/
+
+RUN /usr/local/bin/gix clone --depth 1 https://github.com/Byron/gitoxide gitoxide
+```
+
+
+[releases]: https://github.com/Byron/gitoxide/releases
[rustup]: https://rustup.rs
## Usage
@@ -261,7 +302,6 @@ Project goals can change over time as we learn more, and they can be challenged.
* With the tools and experience available here there is no reason not to support Windows.
* [Windows is tested on CI](https://github.com/Byron/gitoxide/blob/df66d74aa2a8cb62d8a03383135f08c8e8c579a8/.github/workflows/rust.yml#L34)
and failures do prevent releases.
-
## Non-Goals
@@ -275,7 +315,7 @@ Project non-goals can change over time as we learn more, and they can be challen
* **use async IO everywhere**
* for the most part, git operations are heavily reliant on memory mapped IO as well as CPU to decompress data,
which doesn't lend itself well to async IO out of the box.
- * Use `blocking` as well as `gix-features::interrupt` to bring operations into the async world and to control
+ * Use `blocking` as well as `gix-features::interrupt` to bring operations into the async world and to control
long running operations.
* When connecting or streaming over TCP connections, especially when receiving on the server, async seems like a must
though, but behind a feature flag.
@@ -284,12 +324,9 @@ Project non-goals can change over time as we learn more, and they can be challen
If what you have seen so far sparked your interest to contribute, then let us say: We are happy to have you and help you to get started.
-> ❗️Note❗️: For cloning, `gix-lfs` needs to be locally installed or the checkout will fail. `git lfs install` must have been called once, followed
- by `git lfs pull` to replace the `lfs`-pointer files.
-
We recommend running `just test check-size` during the development process to assure CI is green before pushing.
-A backlog for work ready to be picked up is [available in the Project's Kanban board][project-board], which contains instructions on how
+A backlog for work ready to be picked up is [available in the Project's Kanban board][project-board], which contains instructions on how
to pick a task. If it's empty or you have other questions, feel free to [start a discussion][discussions] or reach out to @Byron [privately][keybase].
For additional details, also take a look at the [collaboration guide].
@@ -307,7 +344,7 @@ For additional details, also take a look at the [collaboration guide].
- Get an introduction to `gitoxide` itself which should be a good foundation for any contribution, but isn't a requirement for contributions either.
- [Gifting Gitoxide](https://www.youtube.com/playlist?list=PLMHbQxe1e9MlhyyZQXPi_dc-bKudE-WUw)
- See how PRs are reviewed along with a lot of inner monologue.
-
+
#### Other Media
- [Rustacean Station Podcast](https://rustacean-station.org/episode/055-sebastian-thiel/)
@@ -366,24 +403,23 @@ Provide a CLI to for the most basic user journey:
[fossil-scm]: https://www.fossil-scm.org
[magit]: https://magit.vc
-
## Shortcomings & Limitations
Please take a look at the [`SHORTCOMINGS.md` file](https://github.com/Byron/gitoxide/blob/main/SHORTCOMINGS.md) for details.
-
+
## Credits
* **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
-
+
## 🙏 Special Thanks 🙏
At least for now this section is exclusive to highlight the incredible support that [Josh Triplett](https://github.com/joshtriplett) has provided to me
in the form of advice, sponsorship and countless other benefits that were incredibly meaningful. Going full time with `gitoxide` would hardly have been
feasible without his involvement, and I couldn't be more grateful 😌.
-
+
## License
This project is licensed under either of
@@ -399,6 +435,6 @@ at your option.
* Originally @Byron was really fascinated by [this problem](https://github.com/gitpython-developers/GitPython/issues/765#issuecomment-396072153)
and believes that with `gitoxide` it will be possible to provide the fastest solution for it.
-* @Byron has been absolutely blown away by `git` from the first time he experienced git more than 13 years ago, and
+* @Byron has been absolutely blown away by `git` from the first time he experienced git more than 13 years ago, and
tried to implement it in [various shapes](https://github.com/gitpython-developers/GitPython/pull/1028) and [forms](https://github.com/byron/gogit)
multiple [times](https://github.com/Byron/gitplusplus). Now with Rust @Byron finally feels to have found the right tool for the job!
diff --git a/SECURITY.md b/SECURITY.md
index f80d96826d1..0cfacebcfaf 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,4 +2,9 @@
## Reporting a Vulnerability
-Please inform me by writing an email to the @icloud.com email used in my commits. Thank you.
+Please feel free to [draft a GitHub advisory](https://github.com/Byron/gitoxide/security/advisories/new), and I will work with you to disclose and or resolve the issue
+responsibly.
+
+If this doesn't seem like the right approach or there are questions, please feel free to reach out to the @icloud.com email used in my commits.
+
+Thank you.
diff --git a/_typos.toml b/_typos.toml
index 8d8226d7aa3..ea8c5e4c03a 100644
--- a/_typos.toml
+++ b/_typos.toml
@@ -1,19 +1,32 @@
-[default]
-extend-ignore-identifiers-re = [
- "[a-f0-9]{7,}",
- "[Ff][Oo][Oo]",
- "[a-zA-Z0-9]{20,}",
-]
-
[files]
extend-exclude = [
"**/CHANGELOG.md",
- "**/tests/fixtures/**",
+ "*.response",
+ "etc/corpus/repo_metadata.sample.jsonl",
"gix-config/benches/large_config_file.rs",
- "gix-glob/tests/wildmatch/mod.rs"
+ "gix-config/tests/fixtures/clusterfuzz-testcase-minimized-gix-config-parse-6431708583690240",
+ "gix-glob/tests/wildmatch/mod.rs",
+ "gix-path/tests/fixtures/fuzzed/54k-path-components.path",
]
+ignore-hidden = false
+[default]
+extend-ignore-re = [
+ # PGP signature
+ "[0-9A-Za-z+=]{44,}",
+ '"egal"',
+ '"bar", "bart", "ba"',
+ '"foo/ba"',
+ '"FO", "FO", &\[\], "FO"',
+ '"(BarFoO|BarFoOo|FoO|FoOo)"',
+ "\\|pn: &BStr\\| pn !=",
+]
+extend-ignore-identifiers-re = [
+ # Git commit hash
+ "[0-9a-f]{7,}",
+ "rela_[a-z_]+",
+]
-[default.extend-words]
-rela = "rela"
-unter = "unter"
+[default.extend-identifiers]
+_pn = "_pn"
+ein = "ein"
diff --git a/crate-status.md b/crate-status.md
index 6a43168f4e7..ee017c8ef69 100644
--- a/crate-status.md
+++ b/crate-status.md
@@ -44,32 +44,31 @@ The top-level crate that acts as hub to all functionality provided by the `gix-*
* [ ] handle other non-discovery modes and provide control over environment variable usage required in applications
* [x] rev-parse
- [ ] handle relative paths as relative to working directory
- - [ ] handle `upstream` and `push` resolution.
+ - [x] handle `upstream` and `push` resolution.
* [x] rev-walk
* [x] include tips
* [ ] exclude commits
* [x] instantiation
* [x] access to refs and objects
+ * [x] create a pathspec-search from a set of strings
+ - [ ] allow to construct Pathspecs using data structure instead of enforcing them to be passed as strings.
* **credentials**
* [x] run `git credential` directly
* [x] use credential helper configuration and to obtain credentials with `gix_credentials::helper::Cascade`
- * **config**
- * [ ] facilities to apply the [url-match](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httplturlgt) algorithm and to
- [normalize urls](https://github.com/git/git/blob/be1a02a17ede4082a86dfbfee0f54f345e8b43ac/urlmatch.c#L109:L109) before comparison.
* **traverse**
* [x] commit graphs
* [ ] make [git-notes](https://git-scm.com/docs/git-notes) accessible
* [x] tree entries
* **diffs/changes**
* [x] tree with other tree
- * [ ] respect case-sensitivity of host filesystem.
+ * [x] respect case-sensitivity of host filesystem.
* [x] a way to access various diff related settings or use them
- * [ ] respect `diff.*.textconv`, `diff.*.cachetextconv` and external diff viewers with `diff.*.command`,
+ * [x] respect `diff.*.textconv`, `diff.*.cachetextconv` and external diff viewers with `diff.*.command`,
[along with support for reading `diff` gitattributes](https://github.com/git/git/blob/73876f4861cd3d187a4682290ab75c9dccadbc56/Documentation/gitattributes.txt#L699:L699).
* **rewrite tracking**
* **deviation** - git keeps up to four candidates whereas we use the first-found candidate that matches the similarity percentage.
This can lead to different sources being found. As such, we also don't consider the filename at all.
- * [ ] handle binary files correctly, and apply filters for that matter
+ * [x] handle binary files correctly, and apply filters for that matter
* [x] computation limit with observable reduction of precision when it is hit, for copies and renames separately
* **by identity**
* [x] renames (sym-links are only ever compared by identity)
@@ -78,9 +77,9 @@ The top-level crate that acts as hub to all functionality provided by the `gix-*
* [x] renames
* [x] copies
* [x] 'find-copies-harder' - find copies with the source being the entire tree.
- * [ ] tree or index with working tree
- - [ ] rename tracking
- - [ ] submodule status (recursive)
+ * [x] tree or index with working tree
+ - [x] rename tracking
+ - [x] submodule status (recursive)
* [x] diffs between modified blobs with various algorithms
* [ ] tree with index (via index-from-tree and index)
- [ ] rename tracking
@@ -152,7 +151,10 @@ The top-level crate that acts as hub to all functionality provided by the `gix-*
* [x] read the primitive types `boolean`, `integer`, `string`
* [x] read and interpolate trusted paths
* [x] low-level API for more elaborate access to all details of `git-config` files
- * [ ] a way to make changes to individual configuration files
+ * [ ] a way to make changes to individual configuration files in memory
+ * [ ] write configuration back
+ * [ ] auto-refresh configuration values after they changed on disk
+ * [ ] facilities to apply the [url-match](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httplturlgt) algorithm and to [normalize urls](https://github.com/git/git/blob/be1a02a17ede4082a86dfbfee0f54f345e8b43ac/urlmatch.c#L109:L109) before comparison.
* [x] mailmap
* [x] object replacements (`git replace`)
* [x] read git configuration
@@ -459,7 +461,9 @@ Check out the [performance discussion][gix-traverse-performance] as well.
### gix-pathspec
* [x] parse single
* [ ] parse file line by line (with or without quoting, NUL and LF/CRLF line separation) (see `--pathspec-from-file` and `--pathspec-file-nul`)
-* [ ] matching of paths with git-attributes support
+* [x] matching of paths with git-attributes support
+* [ ] programmatic creation of pathspecs
+* [ ] `TryIntoPathspec` trait to parse strings or accept ready-made pathspecs as well, for use in APIs
### gix-refspec
* [x] parse
@@ -552,12 +556,12 @@ Make it the best-performing implementation and the most convenient one.
### gix-status
* [x] differences between index and worktree to turn index into worktree
- - [ ] rename tracking
+ - [x] rename tracking
+ - [x] untracked files
+ - [ ] support for fs-monitor for modification checks
* [ ] differences between index and index to learn what changed
- [ ] rename tracking
-* [ ] untracked files
-* [ ] fast answer to 'is it dirty'.
-*
+
### gix-worktree-state
* handle the working **tree/checkout**
- [x] checkout an index of files, executables and symlinks just as fast as git
diff --git a/deny.toml b/deny.toml
index ddddea8f5f6..bd16612e281 100644
--- a/deny.toml
+++ b/deny.toml
@@ -8,21 +8,10 @@
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
-# The path where the advisory database is cloned/fetched into
-db-path = "~/.cargo/advisory-db"
-# The url(s) of the advisory databases to use
-db-urls = ["https://github.com/rustsec/advisory-db"]
-# The lint level for security vulnerabilities
-vulnerability = "deny"
-# The lint level for unmaintained crates
-unmaintained = "warn"
-# The lint level for crates that have been yanked from their source registry
-yanked = "warn"
-# The lint level for crates with security notices. Note that as of
-# 2019-12-17 there are no security notice advisories in
-# https://github.com/rustsec/advisory-db
-notice = "warn"
-ignore = []
+ignore = [
+ # this is `rustls@0.20.9` coming in with `curl`, which doesn't have an update yet. It's only active optionally, not by default.
+ "RUSTSEC-2024-0336",
+]
@@ -30,28 +19,21 @@ ignore = []
# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
-# The lint level for crates which do not have a detectable license
-unlicensed = "deny"
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
allow = [
"Apache-2.0",
"BSD-3-Clause",
+ "BSL-1.0",
"MIT",
"MIT-0",
"ISC",
"Unicode-DFS-2016",
"LicenseRef-ring",
- "Zlib"
+ "Zlib",
+ "Unicode-3.0"
]
-# Lint level for licenses considered copyleft
-copyleft = "allow"
-# Lint level used when no other predicates are matched
-# 1. License isn't in the allow or deny lists
-# 2. License isn't copyleft
-# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
-default = "deny"
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
diff --git a/etc/check-package-size.sh b/etc/check-package-size.sh
index 7eee9d606ba..c23bad23336 100755
--- a/etc/check-package-size.sh
+++ b/etc/check-package-size.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu -o pipefail
diff --git a/etc/copy-packetline.sh b/etc/copy-packetline.sh
new file mode 100755
index 00000000000..9ed5a0eea89
--- /dev/null
+++ b/etc/copy-packetline.sh
@@ -0,0 +1,152 @@
+#!/usr/bin/env bash
+
+set -euC -o pipefail
+
+readonly input_dir='gix-packetline/src'
+readonly output_parent_dir='gix-packetline-blocking'
+readonly output_dir="$output_parent_dir/src"
+
+function fail () {
+ printf '%s: error: %s\n' "$0" "$1" >&2
+ exit 1
+}
+
+function chdir_toplevel () {
+ local root_padded root
+
+ # Find the working tree's root. (Padding covers the trailing-newline case.)
+ root_padded="$(git rev-parse --show-toplevel && echo -n .)" ||
+ fail 'git-rev-parse failed to find top-level dir'
+ root="${root_padded%$'\n.'}"
+
+ cd -- "$root"
+}
+
+function merging () {
+ local git_dir_padded git_dir
+
+ # Find the .git directory. (Padding covers the trailing-newline case.)
+ git_dir_padded="$(git rev-parse --git-dir && echo -n .)" ||
+ fail 'git-rev-parse failed to find git dir'
+ git_dir="${git_dir_padded%$'\n.'}"
+
+ test -e "$git_dir/MERGE_HEAD"
+}
+
+function output_dir_status () {
+ git status --porcelain --ignored=traditional -- "$output_dir" ||
+ fail 'git-status failed'
+}
+
+function check_output_dir () {
+ if ! test -e "$output_dir"; then
+ # The destination does not exist on disk, so nothing will be lost. Proceed.
+ return
+ fi
+
+ if merging; then
+ # In a merge, it would be confusing to replace anything at the destination.
+ if output_dir_status | grep -q '^'; then
+ fail 'output location exists, and a merge is in progress'
+ fi
+ else
+ # We can lose data if anything of value at the destination is not in the
+ # index. (This includes unstaged deletions, for two reasons. We could lose
+ # track of which files had been deleted. More importantly, replacing a
+ # staged symlink or regular file with an unstaged directory is shown by
+ # git-status as only a deletion, even if the directory is non-empty.)
+ if output_dir_status | grep -q '^.[^ ]'; then
+ fail 'output location exists, with unstaged changes or ignored files'
+ fi
+ fi
+}
+
+function first_line_ends_crlf () {
+ # This is tricky to check portably. In Cygwin-like environments including
+ # MSYS2 and Git Bash, most text processing tools, including awk, sed, and
+ # grep, automatically ignore \r before \n. Some ignore \r everywhere. Some
+ # can be told to keep \r, but in non-portable ways that may affect other
+ # implementations. Bash ignores \r in some places even without "-o igncr",
+ # and ignores \r even more with it, including in all text from command
+ # substitution. Simple checks may be non-portable to other OSes. Fortunately,
+ # tools that treat input as binary data are exempt (even cat, but "-v" is
+ # non-portable, and unreliable in general because lines can end in "^M").
+ # This may be doable without od, by using tr more heavily, but it could be
+ # hard to avoid false positives with unexpected characters or \r without \n.
+
+ head -n 1 -- "$1" | # Get the longest prefix with no non-trailing \n byte.
+ od -An -ta | # Represent all bytes symbolically, without addresses.
+ tr -sd '\n' ' ' | # Scrunch into one line, so "cr nl" appears as such.
+ grep -q 'cr nl$' # Check if the result signifies a \r\n line ending.
+}
+
+function make_header () {
+ local input_file endline
+
+ input_file="$1"
+ endline="$2"
+
+ # shellcheck disable=SC2016 # The backticks are intentionally literal.
+ printf '// DO NOT EDIT - this is a copy of %s. Run `just copy-packetline` to update it.%s%s' \
+ "$input_file" "$endline" "$endline"
+}
+
+function copy_with_header () {
+ local input_file output_file endline
+
+ input_file="$1"
+ output_file="$2"
+
+ if first_line_ends_crlf "$input_file"; then
+ endline=$'\r\n'
+ else
+ endline=$'\n'
+ fi
+
+ make_header "$input_file" "$endline" | cat -- - "$input_file" >"$output_file"
+}
+
+function generate_one () {
+ local input_file output_file
+
+ input_file="$1"
+ output_file="$output_dir${input_file#"$input_dir"}"
+
+ if test -d "$input_file"; then
+ mkdir -p -- "$output_file"
+ elif test -L "$input_file"; then
+ # Cover this case separately, for more useful error messages.
+ fail "input file is symbolic link: $input_file"
+ elif ! test -f "$input_file"; then
+ # This covers less common kinds of files we can't or shouldn't process.
+ fail "input file neither regular file nor directory: $input_file"
+ elif [[ "$input_file" =~ \.rs$ ]]; then
+ copy_with_header "$input_file" "$output_file"
+ else
+ fail "input file not named as Rust source code: $input_file"
+ fi
+}
+
+function generate_all () {
+ local input_file
+
+ if ! test -d "$input_dir"; then
+ fail "no input directory: $input_dir"
+ fi
+ if ! test -d "$output_parent_dir"; then
+ fail "no output parent directory: $output_parent_dir"
+ fi
+ check_output_dir
+
+ rm -rf -- "$output_dir" # It may be a directory, symlink, or regular file.
+ if test -e "$output_dir"; then
+ fail 'unable to remove output location'
+ fi
+
+ find "$input_dir" -print0 | while IFS= read -r -d '' input_file; do
+ generate_one "$input_file"
+ done
+}
+
+chdir_toplevel
+generate_all
diff --git a/etc/corpus/clone-repos.sh b/etc/corpus/clone-repos.sh
index 0581544b16f..b302fcbd4e8 100755
--- a/etc/corpus/clone-repos.sh
+++ b/etc/corpus/clone-repos.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Check if there is input on stdin
if [ -t 0 ]; then
diff --git a/etc/docker/Dockerfile.alpine b/etc/docker/Dockerfile.alpine
new file mode 100644
index 00000000000..0c29bccb162
--- /dev/null
+++ b/etc/docker/Dockerfile.alpine
@@ -0,0 +1,70 @@
+# Please note that this file is not regularly tested, and you are welcome to create PRs with fixes as needed.
+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
+
+
+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
+
+
+FROM bootstrap_build_deps AS bootstrap_builder
+ ARG GITOXIDE_VERSION
+
+ ENV RUST_BACKTRACE=1
+
+ RUN cargo install gitoxide --version "${GITOXIDE_VERSION}" --message-format short \
+ && apk del .bootstrap-gitoxide \
+ && apk del .rust-builder
+
+
+FROM alpine:3.13.3 AS pipeline
+ # hadolint ignore=SC2016
+ RUN apk upgrade --update-cache --available \
+ && { \
+ echo '#!/bin/sh'; \
+ echo 'set -eu'; \
+ echo 'if [ "${#}" -gt 0 ] && [ "${1#-}" = "${1}" ] \'; \
+ echo ' && command -v "${1}" > "/dev/null" 2>&1; then'; \
+ echo ' exec "${@}"'; \
+ echo 'else exec /bin/shfmt "${@}"; fi'; \
+ echo 'exit 0'; \
+ } > /init && chmod +x /init
+
+ COPY --from=bootstrap_builder /usr/local/cargo/bin/gix /usr/local/cargo/bin/
+ COPY --from=bootstrap_builder /usr/local/cargo/bin/ein /usr/local/cargo/bin/
+
+ WORKDIR /usr/local/cargo/bin
+
+ SHELL [ "/bin/ash", "-o", "pipefail", "-c" ]
+
+ RUN find . -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
+ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); gsub(".*/", "", so); print so }' \
+ | xargs -r apk search -f | awk '{ so = $(NF-1); gsub(/-\d+.*$/, "", so); print so }' \
+ | xargs -r apk add --no-cache --virtual .runtime
+
+ ENV PATH="/usr/local/cargo/bin:${PATH}"
+
+ WORKDIR /root
+
+ HEALTHCHECK --retries=1 --timeout=15s CMD gix help
+
+ ENTRYPOINT [ "/init" ]
+
+
+FROM scratch
+ COPY --from=bootstrap_builder /usr/local/cargo/bin/gix /bin/
+ COPY --from=bootstrap_builder /usr/local/cargo/bin/ein /bin/
+
+ ENTRYPOINT [ "/bin/gix" ]
+
+ CMD [ "/bin/gix" ]
+
+# vi: nospell
diff --git a/examples/log.rs b/examples/log.rs
index be892f37e15..c143f8544cc 100644
--- a/examples/log.rs
+++ b/examples/log.rs
@@ -8,7 +8,7 @@ use clap::Parser;
use gix::{
bstr::{BString, ByteSlice},
date::time::format,
- traverse::commit::Sorting,
+ traverse::commit::simple::Sorting,
};
fn main() {
diff --git a/gitoxide-core/CHANGELOG.md b/gitoxide-core/CHANGELOG.md
index 4edba6a85c9..0878ad87357 100644
--- a/gitoxide-core/CHANGELOG.md
+++ b/gitoxide-core/CHANGELOG.md
@@ -5,6 +5,135 @@ 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.38.0 (2024-05-22)
+
+### Bug Fixes
+
+ - more robustness in the face of a trampling-herd of threads loading a single index.
+ The motivating example is here: https://github.com/praetorian-inc/noseyparker/issues/179
+
+ Previously, it was possible for a trampling herd of threads to consolidate the
+ disk state. Most of them would be 'needs-init' threads which could notice that
+ the initialization already happened, and just use that.
+
+ But a thread might be late for the party and somehow manages to not get any
+ newly loaded index, and thus tries to consolidate with what's on disk again.
+ Then it would again determine no change, and return nothing, causing the caller
+ to abort and not find objects it should find because it wouldn't see the index
+ that it should have seen.
+
+ The reason the thread got into this mess is that the 'is-load-ongoing' flagging
+ was racy itself, so it would not wait for ongoing loads and just conclude nothing
+ happened. An extra delay (by yielding) now assures it either seees the loading state
+ and waits for it, sees the newly loaded indices.
+
+ Note that this issue can be reproduced with:
+
+ ```
+ './target/release/gix -r repo-with-one-pack -t10 --trace odb stats --extra-header-lookup'
+ ```
+
+### Commit Statistics
+
+
+
+ - 7 commits contributed to the release over the course of 10 calendar days.
+ - 38 days passed between releases.
+ - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+
+
+view details
+
+ * **Uncategorized**
+ - Adjust changelogs prior to release ([`9511416`](https://github.com/Byron/gitoxide/commit/9511416a6cd0c571233f958c165329c8705c2498))
+ - Merge branch 'various-fixes' ([`d6cd449`](https://github.com/Byron/gitoxide/commit/d6cd44930fb204b06e2b70fc6965e7705530c47a))
+ - Update dependencies ([`cd4de83`](https://github.com/Byron/gitoxide/commit/cd4de8327fc195eb862ab6e138f2315a87374f85))
+ - Merge pull request from GHSA-7w47-3wg8-547c ([`79dce79`](https://github.com/Byron/gitoxide/commit/79dce79c62f6072aa2653780d590dc3993dfa401))
+ - Adapt to changes in `gix-worktree` ([`1ca6a3c`](https://github.com/Byron/gitoxide/commit/1ca6a3ce22887c7eb42ec3e0a19f6e1202715745))
+ - Merge branch 'status' ([`04ef31e`](https://github.com/Byron/gitoxide/commit/04ef31e9d6f5332d49037a5a4c248ebbb5aaf92b))
+ - More robustness in the face of a trampling-herd of threads loading a single index. ([`addf446`](https://github.com/Byron/gitoxide/commit/addf446f052ff74edcdb083f2b2968b313daa940))
+
+
+## 0.37.0 (2024-04-13)
+
+### New Features
+
+ - add `gix status --ignored` support
+ - add `gix status --index-worktree-renames`
+ This enables rename-tracking between worktree and index, something
+ that Git also doesn't do or doesn't do by default.
+ It is, however, available in `git2`.
+ - `gix status` with submodule and rewrite support.
+ Submodule changes are now picked up as long as the submodule is
+ in the index.
+ Further, it's possible to enable rename-tracking between
+ index and worktree separately.
+ - add `gix is-clean|is-changed`
+ It's a good way to compare the time it takes to run a full status
+ compared to a quick is-dirty check.
+ - `gix submodules list --dirty-suffix` for dirty-information
+ This is a submodule-centric and greatly simplified way of obtaining
+ describe information with dirty-suffix.
+
+ Note that `status` information is also possible, but it seems
+ hard to display nicely, which this command isn't great at
+ in the first place.
+ - add `gix commit describe --dirty-suffix`
+ That way a suffix will be added depending on the dirty-state of the repository.
+
+### Bug Fixes (BREAKING)
+
+ - Make `topo` more similar to `Ancestors`, but also rename `Ancestors` to `Simple`
+
+### Commit Statistics
+
+
+
+ - 26 commits contributed to the release over the course of 34 calendar days.
+ - 47 days passed between releases.
+ - 7 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 1 unique issue was worked on: [#1330](https://github.com/Byron/gitoxide/issues/1330)
+
+### Commit Details
+
+
+
+view details
+
+ * **[#1330](https://github.com/Byron/gitoxide/issues/1330)**
+ - Fix unread-fields warnings on latest nightly ([`2e06a00`](https://github.com/Byron/gitoxide/commit/2e06a00800418a6f571ba1731ffe05074565af03))
+ * **Uncategorized**
+ - Release gix-trace v0.1.9, gix-utils v0.1.12, gix-packetline-blocking v0.17.4, gix-filter v0.11.1, gix-fs v0.10.2, gix-traverse v0.39.0, gix-worktree-stream v0.12.0, gix-archive v0.12.0, gix-config v0.36.1, gix-url v0.27.3, gix-index v0.32.0, gix-worktree v0.33.0, gix-diff v0.43.0, gix-pathspec v0.7.3, gix-dir v0.4.0, gix-pack v0.50.0, gix-odb v0.60.0, gix-transport v0.42.0, gix-protocol v0.45.0, gix-status v0.9.0, gix-worktree-state v0.10.0, gix v0.62.0, gix-fsck v0.4.0, gitoxide-core v0.37.0, gitoxide v0.35.0, safety bump 14 crates ([`095c673`](https://github.com/Byron/gitoxide/commit/095c6739b2722a8b9af90776b435ef2da454c0e6))
+ - Prepare changelogs prior to release ([`5755271`](https://github.com/Byron/gitoxide/commit/57552717f46f96c35ba4ddc0a64434354ef845e9))
+ - Merge pull request #1341 from szepeviktor/typos ([`55f379b`](https://github.com/Byron/gitoxide/commit/55f379bc47065822d078393d83d30c0835a89782))
+ - Fix typos ([`f72ecce`](https://github.com/Byron/gitoxide/commit/f72ecce45babcad2a0c9b73c79d01ff502907a57))
+ - Merge branch 'add-topo-walk' ([`b590a9d`](https://github.com/Byron/gitoxide/commit/b590a9d2b6a273f76f0320d2b9fe1f679c08f549))
+ - Adapt to changes in `gix-traverse` ([`1cfeb11`](https://github.com/Byron/gitoxide/commit/1cfeb11f1fe9ad9c7b9084840ed7f5c5877f2f9a))
+ - Make `topo` more similar to `Ancestors`, but also rename `Ancestors` to `Simple` ([`2a9c178`](https://github.com/Byron/gitoxide/commit/2a9c178326b7f13ba6bc1f89fc2b9d9facbecf48))
+ - Adapt to changes in `gix-traverse` ([`6154bf3`](https://github.com/Byron/gitoxide/commit/6154bf3a346d69f9749271d50e4f3aacdcbad4d0))
+ - Merge branch 'status' ([`45edd2e`](https://github.com/Byron/gitoxide/commit/45edd2ea66035adf526cb2f617873dcba60a2a9a))
+ - Adapt to changes in `gix-index` ([`1e1fce1`](https://github.com/Byron/gitoxide/commit/1e1fce11a968ebbcede1135ccbd0b03e749a1267))
+ - Release gix-packetline v0.17.5, gix-transport v0.41.3, gix v0.61.1 ([`57579f1`](https://github.com/Byron/gitoxide/commit/57579f1ee4ef12c214db36325a2a0b2e8b2b14fd))
+ - Release gix-actor v0.31.1, gix-object v0.42.1, gix-index v0.31.1, gix-pathspec v0.7.2, gix-dir v0.3.0, gix-status v0.8.0, gix v0.61.0, safety bump 2 crates ([`155cc45`](https://github.com/Byron/gitoxide/commit/155cc45730b259e662d7c4be42a469a3af3750e1))
+ - Merge branch 'improvements-for-cargo' ([`41cd53e`](https://github.com/Byron/gitoxide/commit/41cd53e2af76e35e047aac4eca6324774df4cb50))
+ - Adapt to changes in `gix` ([`eff82eb`](https://github.com/Byron/gitoxide/commit/eff82eb0c67a7e7153c6119623a8aec052661b7d))
+ - Release gix-date v0.8.5, gix-hash v0.14.2, gix-trace v0.1.8, gix-utils v0.1.11, gix-features v0.38.1, gix-actor v0.31.0, gix-validate v0.8.4, gix-object v0.42.0, gix-path v0.10.7, gix-glob v0.16.2, gix-quote v0.4.12, gix-attributes v0.22.2, gix-command v0.3.6, gix-filter v0.11.0, gix-fs v0.10.1, gix-chunk v0.4.8, gix-commitgraph v0.24.2, gix-hashtable v0.5.2, gix-revwalk v0.13.0, gix-traverse v0.38.0, gix-worktree-stream v0.11.0, gix-archive v0.11.0, gix-config-value v0.14.6, gix-tempfile v13.1.1, gix-lock v13.1.1, gix-ref v0.43.0, gix-sec v0.10.6, gix-config v0.36.0, gix-prompt v0.8.4, gix-url v0.27.2, gix-credentials v0.24.2, gix-ignore v0.11.2, gix-bitmap v0.2.11, gix-index v0.31.0, gix-worktree v0.32.0, gix-diff v0.42.0, gix-discover v0.31.0, gix-pathspec v0.7.1, gix-dir v0.2.0, gix-macros v0.1.4, gix-mailmap v0.23.0, gix-negotiate v0.13.0, gix-pack v0.49.0, gix-odb v0.59.0, gix-packetline v0.17.4, gix-transport v0.41.2, gix-protocol v0.44.2, gix-revision v0.27.0, gix-refspec v0.23.0, gix-status v0.7.0, gix-submodule v0.10.0, gix-worktree-state v0.9.0, gix v0.60.0, safety bump 26 crates ([`b050327`](https://github.com/Byron/gitoxide/commit/b050327e76f234b19be921b78b7b28e034319fdb))
+ - Merge branch 'status' ([`3e5c974`](https://github.com/Byron/gitoxide/commit/3e5c974dd62ac134711c6c2f5a5490187a6ea55e))
+ - Add `gix status --format` to communicate the current format is very simple. ([`23bea36`](https://github.com/Byron/gitoxide/commit/23bea36f046a6f652cd1e06885ae132c85bb4f05))
+ - Add `gix status --ignored` support ([`84c74ff`](https://github.com/Byron/gitoxide/commit/84c74ffa698d35f8395c63db6acd3d0e6700d07f))
+ - Add `gix status --index-worktree-renames` ([`66e87cd`](https://github.com/Byron/gitoxide/commit/66e87cd31c060c3f97ac685ee0541c408f600362))
+ - Fix lints for nightly, and clippy ([`f8ce3d0`](https://github.com/Byron/gitoxide/commit/f8ce3d0721b6a53713a9392f2451874f520bc44c))
+ - `gix status` with submodule and rewrite support. ([`61c002b`](https://github.com/Byron/gitoxide/commit/61c002bc4ca5b5345c411e561fdcb492e7ae1d97))
+ - Add `gix is-clean|is-changed` ([`98b3680`](https://github.com/Byron/gitoxide/commit/98b368095ec99d1bc287da7f9294a9fce424deed))
+ - `gix submodules list --dirty-suffix` for dirty-information ([`afd20ca`](https://github.com/Byron/gitoxide/commit/afd20caadb40b6b793f2099b7232669f9a8f9086))
+ - Add `gix commit describe --dirty-suffix` ([`58231b4`](https://github.com/Byron/gitoxide/commit/58231b418fa39ea122ef41bb7691289f5b0be855))
+ - Adapt to changes in `gix` ([`2d40bdf`](https://github.com/Byron/gitoxide/commit/2d40bdf325ed5b09b0ef6fd21e8b3da47d710451))
+
+
## 0.36.0 (2024-02-25)
### New Features
@@ -18,7 +147,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- - 29 commits contributed to the release over the course of 57 calendar days.
+ - 30 commits contributed to the release over the course of 57 calendar days.
- 58 days passed between releases.
- 4 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
@@ -30,6 +159,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details
* **Uncategorized**
+ - Release gix-date v0.8.4, gix-utils v0.1.10, gix-actor v0.30.1, gix-object v0.41.1, gix-path v0.10.6, gix-glob v0.16.1, gix-quote v0.4.11, gix-attributes v0.22.1, gix-command v0.3.5, gix-filter v0.10.0, gix-commitgraph v0.24.1, gix-worktree-stream v0.10.0, gix-archive v0.10.0, gix-config-value v0.14.5, gix-ref v0.42.0, gix-sec v0.10.5, gix-config v0.35.0, gix-prompt v0.8.3, gix-url v0.27.1, gix-credentials v0.24.1, gix-ignore v0.11.1, gix-index v0.30.0, gix-worktree v0.31.0, gix-diff v0.41.0, gix-discover v0.30.0, gix-pathspec v0.7.0, gix-dir v0.1.0, gix-pack v0.48.0, gix-odb v0.58.0, gix-transport v0.41.1, gix-protocol v0.44.1, gix-revision v0.26.1, gix-refspec v0.22.1, gix-status v0.6.0, gix-submodule v0.9.0, gix-worktree-state v0.8.0, gix v0.59.0, gix-fsck v0.3.0, gitoxide-core v0.36.0, gitoxide v0.34.0, safety bump 10 crates ([`45b4470`](https://github.com/Byron/gitoxide/commit/45b447045bc826f252129c300c531acde2652c64))
- Prepare changelogs prior to release ([`f2e111f`](https://github.com/Byron/gitoxide/commit/f2e111f768fc1bc6182355261c20b63610cffec7))
- Merge branch 'status' ([`d53504a`](https://github.com/Byron/gitoxide/commit/d53504a1fad41cec7b6ca2a4abb7f185d8941e3f))
- Adapt to changes in `gix-dir` ([`aa7c190`](https://github.com/Byron/gitoxide/commit/aa7c1908b82e3e23859a4c663faa40ec54611919))
diff --git a/gitoxide-core/Cargo.toml b/gitoxide-core/Cargo.toml
index b69fb946a2a..1a5458e12ba 100644
--- a/gitoxide-core/Cargo.toml
+++ b/gitoxide-core/Cargo.toml
@@ -2,7 +2,7 @@
name = "gitoxide-core"
description = "The library implementing all capabilities of the gitoxide CLI"
repository = "https://github.com/Byron/gitoxide"
-version = "0.36.0"
+version = "0.38.0"
authors = ["Sebastian Thiel "]
license = "MIT OR Apache-2.0"
edition = "2021"
@@ -23,7 +23,7 @@ estimate-hours = ["dep:fs-err", "dep:crossbeam-channel", "dep:smallvec"]
query = ["dep:rusqlite"]
## Run algorithms on a corpus of repositories and store their results for later comparison and intelligence gathering.
## *Note that* `organize` we need for finding git repositories fast.
-corpus = [ "dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:serde_json", "dep:tracing-forest", "dep:tracing-subscriber", "tracing", "dep:parking_lot" ]
+corpus = ["dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:serde_json", "dep:tracing-forest", "dep:tracing-subscriber", "tracing", "dep:parking_lot"]
## The ability to create archives from virtual worktrees, similar to `git archive`.
archive = ["dep:gix-archive-for-configuration-only", "gix/worktree-archive"]
@@ -47,12 +47,12 @@ 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.59.0", path = "../gix", default-features = false, features = ["blob-diff", "revision", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt", "status", "dirwalk"] }
-gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.48.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.41.1", path = "../gix-transport", default-features = false }
-gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.10.0", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] }
-gix-status = { version = "^0.6.0", path = "../gix-status" }
-gix-fsck = { version = "^0.3.0", path = "../gix-fsck" }
+gix = { version = "^0.63.0", path = "../gix", default-features = false, features = ["blob-diff", "revision", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt", "status", "dirwalk"] }
+gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.51.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.42.1", path = "../gix-transport", default-features = false }
+gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.13.1", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] }
+gix-status = { version = "^0.10.0", path = "../gix-status" }
+gix-fsck = { version = "^0.4.0", path = "../gix-fsck" }
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
anyhow = "1.0.42"
thiserror = "1.0.34"
@@ -68,7 +68,7 @@ futures-io = { version = "0.3.16", optional = true }
blocking = { version = "1.0.2", optional = true }
# for 'organize' functionality
-gix-url = { version = "^0.27.1", path = "../gix-url", optional = true }
+gix-url = { version = "^0.27.3", path = "../gix-url", optional = true }
jwalk = { version = "0.8.0", optional = true }
# for 'hours'
@@ -77,7 +77,7 @@ crossbeam-channel = { version = "0.5.6", optional = true }
smallvec = { version = "1.10.0", optional = true }
# for 'query' and 'corpus'
-rusqlite = { version = "0.30.0", optional = true, features = ["bundled"] }
+rusqlite = { version = "0.31.0", optional = true, features = ["bundled"] }
# for 'corpus'
parking_lot = { version = "0.12.1", optional = true }
diff --git a/gitoxide-core/src/hours/mod.rs b/gitoxide-core/src/hours/mod.rs
index 0418ef1f01e..4080c30c4a0 100644
--- a/gitoxide-core/src/hours/mod.rs
+++ b/gitoxide-core/src/hours/mod.rs
@@ -175,7 +175,7 @@ where
}
commit_idx += 1;
}
- Err(gix::traverse::commit::ancestors::Error::Find { .. }) => {
+ Err(gix::traverse::commit::simple::Error::Find { .. }) => {
is_shallow = true;
break;
}
diff --git a/gitoxide-core/src/index/information.rs b/gitoxide-core/src/index/information.rs
index aa618ab10c3..4540e5bc832 100644
--- a/gitoxide-core/src/index/information.rs
+++ b/gitoxide-core/src/index/information.rs
@@ -6,6 +6,7 @@ pub struct Options {
#[cfg(feature = "serde")]
mod serde_only {
+ use gix::index::entry::Stage;
mod ext {
#[derive(serde::Serialize)]
@@ -115,11 +116,10 @@ mod serde_only {
let (mut intent_to_add, mut skip_worktree) = (0, 0);
for entry in f.entries() {
match entry.flags.stage() {
- 0 => stage_0_merged += 1,
- 1 => stage_1_base += 1,
- 2 => stage_2_ours += 1,
- 3 => stage_3_theirs += 1,
- invalid => anyhow::bail!("Invalid stage {} encountered", invalid),
+ Stage::Unconflicted => stage_0_merged += 1,
+ Stage::Base => stage_1_base += 1,
+ Stage::Ours => stage_2_ours += 1,
+ Stage::Theirs => stage_3_theirs += 1,
}
match entry.mode {
gix::index::entry::Mode::DIR => dir += 1,
diff --git a/gitoxide-core/src/lib.rs b/gitoxide-core/src/lib.rs
index 2cf788a994a..9ff7ab73760 100644
--- a/gitoxide-core/src/lib.rs
+++ b/gitoxide-core/src/lib.rs
@@ -84,3 +84,11 @@ pub use discover::discover;
#[cfg(all(feature = "async-client", feature = "blocking-client"))]
compile_error!("Cannot set both 'blocking-client' and 'async-client' features as they are mutually exclusive");
+
+fn is_dir_to_mode(is_dir: bool) -> gix::index::entry::Mode {
+ if is_dir {
+ gix::index::entry::Mode::DIR
+ } else {
+ gix::index::entry::Mode::FILE
+ }
+}
diff --git a/gitoxide-core/src/pack/create.rs b/gitoxide-core/src/pack/create.rs
index f8141e357d6..76bacd079c3 100644
--- a/gitoxide-core/src/pack/create.rs
+++ b/gitoxide-core/src/pack/create.rs
@@ -130,7 +130,7 @@ where
.collect::, _>>()?;
let handle = repo.objects.into_shared_arc().to_cache_arc();
let iter = Box::new(
- traverse::commit::Ancestors::new(tips, traverse::commit::ancestors::State::default(), handle.clone())
+ traverse::commit::Simple::new(tips, handle.clone())
.map(|res| res.map_err(|err| Box::new(err) as Box<_>).map(|c| c.id))
.inspect(move |_| progress.inc()),
);
@@ -361,7 +361,7 @@ pub mod input_iteration {
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("input objects couldn't be iterated completely")]
- Iteration(#[from] traverse::commit::ancestors::Error),
+ Iteration(#[from] traverse::commit::simple::Error),
#[error("An error occurred while reading hashes from standard input")]
InputLinesIo(#[from] std::io::Error),
#[error("Could not decode hex hash provided on standard input")]
diff --git a/gitoxide-core/src/query/engine/update.rs b/gitoxide-core/src/query/engine/update.rs
index b5c6467e0d6..2e809f0e2b3 100644
--- a/gitoxide-core/src/query/engine/update.rs
+++ b/gitoxide-core/src/query/engine/update.rs
@@ -429,7 +429,7 @@ pub fn update(
break;
}
}
- Err(gix::traverse::commit::ancestors::Error::Find { .. }) => {
+ Err(gix::traverse::commit::simple::Error::Find { .. }) => {
writeln!(err, "shallow repository - commit history is truncated").ok();
break;
}
diff --git a/gitoxide-core/src/repository/attributes/query.rs b/gitoxide-core/src/repository/attributes/query.rs
index 09d1b0a0b48..9081eb9ed78 100644
--- a/gitoxide-core/src/repository/attributes/query.rs
+++ b/gitoxide-core/src/repository/attributes/query.rs
@@ -1,4 +1,4 @@
-use gix::repository::IndexPersistedOrInMemory;
+use gix::worktree::IndexPersistedOrInMemory;
use crate::OutputFormat;
@@ -14,6 +14,7 @@ pub(crate) mod function {
use gix::bstr::BStr;
use crate::{
+ is_dir_to_mode,
repository::{
attributes::query::{attributes_cache, Options},
PathsOrPatterns,
@@ -38,12 +39,12 @@ pub(crate) mod function {
match input {
PathsOrPatterns::Paths(paths) => {
for path in paths {
- let is_dir = gix::path::from_bstr(Cow::Borrowed(path.as_ref()))
+ let mode = gix::path::from_bstr(Cow::Borrowed(path.as_ref()))
.metadata()
.ok()
- .map(|m| m.is_dir());
+ .map(|m| is_dir_to_mode(m.is_dir()));
- let entry = cache.at_entry(path.as_slice(), is_dir)?;
+ let entry = cache.at_entry(path.as_slice(), mode)?;
if !entry.matching_attributes(&mut matches) {
continue;
}
@@ -61,9 +62,9 @@ pub(crate) mod function {
)?;
let mut pathspec_matched_entry = false;
if let Some(it) = pathspec.index_entries_with_paths(&index) {
- for (path, _entry) in it {
+ for (path, entry) in it {
pathspec_matched_entry = true;
- let entry = cache.at_entry(path, Some(false))?;
+ let entry = cache.at_entry(path, entry.mode.into())?;
if !entry.matching_attributes(&mut matches) {
continue;
}
@@ -87,10 +88,10 @@ pub(crate) mod function {
let path = pattern.path();
let entry = cache.at_entry(
path,
- Some(
+ Some(is_dir_to_mode(
workdir.map_or(false, |wd| wd.join(gix::path::from_bstr(path)).is_dir())
|| pattern.signature.contains(gix::pathspec::MagicSignature::MUST_BE_DIR),
- ),
+ )),
)?;
if !entry.matching_attributes(&mut matches) {
continue;
diff --git a/gitoxide-core/src/repository/attributes/validate_baseline.rs b/gitoxide-core/src/repository/attributes/validate_baseline.rs
index f2c92f71a30..686c668add6 100644
--- a/gitoxide-core/src/repository/attributes/validate_baseline.rs
+++ b/gitoxide-core/src/repository/attributes/validate_baseline.rs
@@ -192,7 +192,7 @@ pub(crate) mod function {
);
for (rela_path, baseline) in rx_base {
- let entry = cache.at_entry(rela_path.as_str(), Some(false))?;
+ let entry = cache.at_entry(rela_path.as_str(), None)?;
match baseline {
Baseline::Attribute { assignments: expected } => {
entry.matching_attributes(&mut matches);
@@ -262,6 +262,8 @@ pub(crate) mod function {
}
#[derive(Debug)]
+ // See note on `Mismatch`
+ #[allow(dead_code)]
pub struct ExcludeLocation {
pub line: usize,
pub rela_source_file: String,
@@ -269,6 +271,9 @@ pub(crate) mod function {
}
#[derive(Debug)]
+ // We debug-print this structure, which makes all fields 'used', but it doesn't count.
+ // TODO: find a way to not have to do more work, but make the warning go away.
+ #[allow(dead_code)]
pub enum Mismatch {
Attributes {
actual: Vec,
@@ -281,6 +286,8 @@ pub(crate) mod function {
}
#[derive(Debug)]
+ // See note on `Mismatch`
+ #[allow(dead_code)]
pub struct ExcludeMatch {
pub pattern: gix::glob::Pattern,
pub source: Option,
@@ -298,13 +305,13 @@ pub(crate) mod function {
}
fn parse_exclude(line: &str) -> Option<(String, Baseline)> {
- let (left, value) = line.split_at(line.find(|c| c == '\t')?);
+ let (left, value) = line.split_at(line.find('\t')?);
let value = &value[1..];
let location = if left == "::" {
None
} else {
- let mut tokens = left.split(|b| b == ':');
+ let mut tokens = left.split(':');
let source = tokens.next()?;
let line_number: usize = tokens.next()?.parse().ok()?;
let pattern = tokens.next()?;
@@ -356,8 +363,8 @@ pub(crate) mod function {
"unspecified" => StateRef::Unspecified,
_ => StateRef::from_bytes(info.as_bytes()),
};
- path = path.trim_end_matches(|b| b == ':');
- let attr = attr.trim_end_matches(|b| b == ':');
+ path = path.trim_end_matches(':');
+ let attr = attr.trim_end_matches(':');
let assignment = gix::attrs::AssignmentRef {
name: gix::attrs::NameRef::try_from(attr.as_bytes().as_bstr()).ok()?,
state,
diff --git a/gitoxide-core/src/repository/clean.rs b/gitoxide-core/src/repository/clean.rs
index fe91e3d2b38..b9bac90d9f3 100644
--- a/gitoxide-core/src/repository/clean.rs
+++ b/gitoxide-core/src/repository/clean.rs
@@ -60,7 +60,7 @@ pub(crate) mod function {
let index = repo.index_or_empty()?;
let pathspec_for_dirwalk = !pathspec_matches_result;
let has_patterns = !patterns.is_empty();
- let mut collect = InterruptableCollect::default();
+ let mut collect = InterruptibleCollect::default();
let collapse_directories = CollapseDirectory;
let options = repo
.dirwalk_options()?
@@ -86,6 +86,7 @@ pub(crate) mod function {
} else {
Vec::new()
},
+ &gix::interrupt::IS_INTERRUPTED,
options,
&mut collect,
)?;
@@ -364,11 +365,11 @@ pub(crate) mod function {
}
#[derive(Default)]
- struct InterruptableCollect {
+ struct InterruptibleCollect {
inner: gix::dir::walk::delegate::Collect,
}
- impl gix::dir::walk::Delegate for InterruptableCollect {
+ impl gix::dir::walk::Delegate for InterruptibleCollect {
fn emit(&mut self, entry: EntryRef<'_>, collapsed_directory_status: Option) -> walk::Action {
let res = self.inner.emit(entry, collapsed_directory_status);
if gix::interrupt::is_triggered() {
diff --git a/gitoxide-core/src/repository/clone.rs b/gitoxide-core/src/repository/clone.rs
index 9f09b71d55e..cf810deb389 100644
--- a/gitoxide-core/src/repository/clone.rs
+++ b/gitoxide-core/src/repository/clone.rs
@@ -6,6 +6,7 @@ pub struct Options {
pub handshake_info: bool,
pub no_tags: bool,
pub shallow: gix::remote::fetch::Shallow,
+ pub ref_name: Option,
}
pub const PROGRESS_RANGE: std::ops::RangeInclusive = 1..=3;
@@ -31,6 +32,7 @@ pub(crate) mod function {
handshake_info,
bare,
no_tags,
+ ref_name,
shallow,
}: Options,
) -> anyhow::Result<()>
@@ -75,6 +77,7 @@ pub(crate) mod function {
}
let (mut checkout, fetch_outcome) = prepare
.with_shallow(shallow)
+ .with_ref_name(ref_name.as_ref())?
.fetch_then_checkout(&mut progress, &gix::interrupt::IS_INTERRUPTED)?;
let (repo, outcome) = if bare {
diff --git a/gitoxide-core/src/repository/commit.rs b/gitoxide-core/src/repository/commit.rs
index 17ce99e5f3c..e0070dc2ae3 100644
--- a/gitoxide-core/src/repository/commit.rs
+++ b/gitoxide-core/src/repository/commit.rs
@@ -52,6 +52,7 @@ pub fn describe(
statistics,
max_candidates,
long_format,
+ dirty_suffix,
}: describe::Options,
) -> Result<()> {
repo.object_cache_size_if_unset(4 * 1024 * 1024);
@@ -80,7 +81,7 @@ pub fn describe(
writeln!(err, "traversed {} commits", resolution.outcome.commits_seen)?;
}
- let mut describe_id = resolution.format()?;
+ let mut describe_id = resolution.format_with_dirty_suffix(dirty_suffix)?;
describe_id.long(long_format);
writeln!(out, "{describe_id}")?;
@@ -97,5 +98,6 @@ pub mod describe {
pub long_format: bool,
pub statistics: bool,
pub max_candidates: usize,
+ pub dirty_suffix: Option,
}
}
diff --git a/gitoxide-core/src/repository/commitgraph/list.rs b/gitoxide-core/src/repository/commitgraph/list.rs
index 59e74a699cd..d9c024ed3f1 100644
--- a/gitoxide-core/src/repository/commitgraph/list.rs
+++ b/gitoxide-core/src/repository/commitgraph/list.rs
@@ -2,7 +2,7 @@ pub(crate) mod function {
use std::{borrow::Cow, ffi::OsString};
use anyhow::{bail, Context};
- use gix::{prelude::ObjectIdExt, traverse::commit::Sorting};
+ use gix::{prelude::ObjectIdExt, traverse::commit::simple::Sorting};
use crate::OutputFormat;
diff --git a/gitoxide-core/src/repository/credential.rs b/gitoxide-core/src/repository/credential.rs
index b9b93b9d057..c901f06f2ba 100644
--- a/gitoxide-core/src/repository/credential.rs
+++ b/gitoxide-core/src/repository/credential.rs
@@ -1,5 +1,3 @@
-use std::convert::TryInto;
-
#[derive(Debug, thiserror::Error)]
enum Error {
#[error(transparent)]
diff --git a/gitoxide-core/src/repository/dirty.rs b/gitoxide-core/src/repository/dirty.rs
new file mode 100644
index 00000000000..8981199d532
--- /dev/null
+++ b/gitoxide-core/src/repository/dirty.rs
@@ -0,0 +1,32 @@
+use crate::OutputFormat;
+use anyhow::bail;
+
+pub enum Mode {
+ IsClean,
+ IsDirty,
+}
+
+pub fn check(
+ repo: gix::Repository,
+ mode: Mode,
+ out: &mut dyn std::io::Write,
+ format: OutputFormat,
+) -> anyhow::Result<()> {
+ if format != OutputFormat::Human {
+ bail!("JSON output isn't implemented yet");
+ }
+ let is_dirty = repo.is_dirty()?;
+ let res = match (is_dirty, mode) {
+ (false, Mode::IsClean) => Ok("The repository is clean"),
+ (true, Mode::IsClean) => Err("The repository has changes"),
+ (false, Mode::IsDirty) => Err("The repository is clean"),
+ (true, Mode::IsDirty) => Ok("The repository has changes"),
+ };
+
+ let suffix = "(not counting untracked files)";
+ match res {
+ Ok(msg) => writeln!(out, "{msg} {suffix}")?,
+ Err(msg) => bail!("{msg} {suffix}"),
+ }
+ Ok(())
+}
diff --git a/gitoxide-core/src/repository/exclude.rs b/gitoxide-core/src/repository/exclude.rs
index ac837fe0303..a0cd212d08e 100644
--- a/gitoxide-core/src/repository/exclude.rs
+++ b/gitoxide-core/src/repository/exclude.rs
@@ -3,7 +3,7 @@ use std::{borrow::Cow, io};
use anyhow::bail;
use gix::bstr::BStr;
-use crate::{repository::PathsOrPatterns, OutputFormat};
+use crate::{is_dir_to_mode, repository::PathsOrPatterns, OutputFormat};
pub mod query {
use std::ffi::OsString;
@@ -44,11 +44,11 @@ pub fn query(
match input {
PathsOrPatterns::Paths(paths) => {
for path in paths {
- let is_dir = gix::path::from_bstr(Cow::Borrowed(path.as_ref()))
+ let mode = gix::path::from_bstr(Cow::Borrowed(path.as_ref()))
.metadata()
.ok()
- .map(|m| m.is_dir());
- let entry = cache.at_entry(path.as_slice(), is_dir)?;
+ .map(|m| is_dir_to_mode(m.is_dir()));
+ let entry = cache.at_entry(path.as_slice(), mode)?;
let match_ = entry
.matching_exclude_pattern()
.and_then(|m| (show_ignore_patterns || !m.pattern.is_negative()).then_some(m));
@@ -66,9 +66,9 @@ pub fn query(
)?;
if let Some(it) = pathspec.index_entries_with_paths(&index) {
- for (path, _entry) in it {
+ for (path, entry) in it {
pathspec_matched_something = true;
- let entry = cache.at_entry(path, Some(false))?;
+ let entry = cache.at_entry(path, entry.mode.into())?;
let match_ = entry
.matching_exclude_pattern()
.and_then(|m| (show_ignore_patterns || !m.pattern.is_negative()).then_some(m));
@@ -92,10 +92,10 @@ pub fn query(
let path = pattern.path();
let entry = cache.at_entry(
path,
- Some(
+ Some(is_dir_to_mode(
workdir.map_or(false, |wd| wd.join(gix::path::from_bstr(path)).is_dir())
|| pattern.signature.contains(gix::pathspec::MagicSignature::MUST_BE_DIR),
- ),
+ )),
)?;
let match_ = entry
.matching_exclude_pattern()
diff --git a/gitoxide-core/src/repository/index/entries.rs b/gitoxide-core/src/repository/index/entries.rs
index b4f335e6ae3..20a21e3a38b 100644
--- a/gitoxide-core/src/repository/index/entries.rs
+++ b/gitoxide-core/src/repository/index/entries.rs
@@ -23,13 +23,15 @@ pub(crate) mod function {
io::{BufWriter, Write},
};
+ use gix::index::entry::Stage;
use gix::{
bstr::{BStr, BString},
- repository::IndexPersistedOrInMemory,
+ worktree::IndexPersistedOrInMemory,
Repository,
};
use crate::{
+ is_dir_to_mode,
repository::index::entries::{Attributes, Options},
OutputFormat,
};
@@ -173,7 +175,7 @@ pub(crate) mod function {
}
// The user doesn't want attributes, so we set the cache position on demand only
None => cache
- .at_entry(rela_path, Some(is_dir))
+ .at_entry(rela_path, Some(is_dir_to_mode(is_dir)))
.ok()
.map(|platform| platform.matching_attributes(out))
.unwrap_or_default(),
@@ -317,7 +319,7 @@ pub(crate) mod function {
#[cfg(feature = "serde")]
fn to_json(
- mut out: &mut impl std::io::Write,
+ out: &mut impl std::io::Write,
index: &gix::index::File,
entry: &gix::index::Entry,
attrs: Option,
@@ -336,7 +338,7 @@ pub(crate) mod function {
}
serde_json::to_writer(
- &mut out,
+ &mut *out,
&Entry {
stat: &entry.stat,
hex_id: entry.id.to_hex().to_string(),
@@ -392,11 +394,10 @@ pub(crate) mod function {
out,
"{} {}{:?} {} {}{}{}",
match entry.flags.stage() {
- 0 => " ",
- 1 => "BASE ",
- 2 => "OURS ",
- 3 => "THEIRS ",
- _ => "UNKNOWN",
+ Stage::Unconflicted => " ",
+ Stage::Base => "BASE ",
+ Stage::Ours => "OURS ",
+ Stage::Theirs => "THEIRS ",
},
if entry.flags.is_empty() {
"".to_string()
diff --git a/gitoxide-core/src/repository/mod.rs b/gitoxide-core/src/repository/mod.rs
index 35d0c156a95..55816dcb774 100644
--- a/gitoxide-core/src/repository/mod.rs
+++ b/gitoxide-core/src/repository/mod.rs
@@ -26,6 +26,7 @@ pub use credential::function as credential;
pub mod attributes;
#[cfg(feature = "clean")]
pub mod clean;
+pub mod dirty;
#[cfg(feature = "clean")]
pub use clean::function::clean;
#[cfg(feature = "blocking-client")]
diff --git a/gitoxide-core/src/repository/odb.rs b/gitoxide-core/src/repository/odb.rs
index 85c35618db2..e8cb1f7a0b1 100644
--- a/gitoxide-core/src/repository/odb.rs
+++ b/gitoxide-core/src/repository/odb.rs
@@ -1,4 +1,5 @@
use std::io;
+use std::sync::atomic::Ordering;
use anyhow::bail;
@@ -50,6 +51,8 @@ pub mod statistics {
pub struct Options {
pub format: OutputFormat,
pub thread_limit: Option,
+ /// A debug-flag that triggers looking up the headers of all objects again, but without indices preloaded
+ pub extra_header_lookup: bool,
}
}
@@ -59,7 +62,11 @@ pub fn statistics(
mut progress: impl gix::Progress,
out: impl io::Write,
mut err: impl io::Write,
- statistics::Options { format, thread_limit }: statistics::Options,
+ statistics::Options {
+ format,
+ thread_limit,
+ extra_header_lookup,
+ }: statistics::Options,
) -> anyhow::Result<()> {
use bytesize::ByteSize;
use gix::odb::{find, HeaderExt};
@@ -76,6 +83,10 @@ pub fn statistics(
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[derive(Default)]
struct Statistics {
+ /// All objects that were used to produce these statistics.
+ /// Only `Some` if we are doing an extra round of header queries on a repository without loaded indices.
+ #[cfg_attr(feature = "serde", serde(skip_serializing))]
+ ids: Option>,
total_objects: usize,
loose_objects: usize,
packed_objects: usize,
@@ -135,14 +146,17 @@ pub fn statistics(
}
impl gix::parallel::Reduce for Reduce {
- type Input = Result, anyhow::Error>;
+ type Input = Result, anyhow::Error>;
type FeedProduce = ();
type Output = Statistics;
type Error = anyhow::Error;
fn feed(&mut self, items: Self::Input) -> Result {
- for item in items? {
+ for (id, item) in items? {
self.stats.consume(item);
+ if let Some(ids) = self.stats.ids.as_mut() {
+ ids.push(id);
+ }
}
Ok(())
}
@@ -154,9 +168,9 @@ pub fn statistics(
}
let cancelled = || anyhow::anyhow!("Cancelled by user");
- let object_ids = repo.objects.store_ref().iter()?.filter_map(Result::ok);
+ let object_ids = repo.objects.iter()?.filter_map(Result::ok);
let chunk_size = 1_000;
- let stats = if gix::parallel::num_threads(thread_limit) > 1 {
+ let mut stats = if gix::parallel::num_threads(thread_limit) > 1 {
gix::parallel::in_parallel(
gix::interrupt::Iter::new(
gix::features::iter::Chunks {
@@ -166,19 +180,30 @@ pub fn statistics(
cancelled,
),
thread_limit,
- move |_| (repo.objects.clone().into_inner(), counter),
+ {
+ let objects = repo.objects.clone();
+ move |_| (objects.clone().into_inner(), counter)
+ },
|ids, (handle, counter)| {
let ids = ids?;
- counter.fetch_add(ids.len(), std::sync::atomic::Ordering::Relaxed);
+ counter.fetch_add(ids.len(), Ordering::Relaxed);
let out = ids
.into_iter()
- .map(|id| handle.header(id))
+ .map(|id| handle.header(id).map(|hdr| (id, hdr)))
.collect::, _>>()?;
Ok(out)
},
- Reduce::default(),
+ Reduce {
+ stats: Statistics {
+ ids: extra_header_lookup.then(Vec::new),
+ ..Default::default()
+ },
+ },
)?
} else {
+ if extra_header_lookup {
+ bail!("extra-header-lookup is only meaningful in threaded mode");
+ }
let mut stats = Statistics::default();
for (count, id) in object_ids.enumerate() {
@@ -193,6 +218,39 @@ pub fn statistics(
progress.show_throughput(start);
+ if let Some(mut ids) = stats.ids.take() {
+ // Critical to re-open the repo to assure we don't have any ODB state and start fresh.
+ let start = std::time::Instant::now();
+ let repo = gix::open_opts(repo.git_dir(), repo.open_options().to_owned())?;
+ progress.set_name("re-counting".into());
+ progress.init(Some(ids.len()), gix::progress::count("objects"));
+ let counter = progress.counter();
+ counter.store(0, Ordering::Relaxed);
+ let errors = gix::parallel::in_parallel_with_slice(
+ &mut ids,
+ thread_limit,
+ {
+ let objects = repo.objects.clone();
+ move |_| (objects.clone().into_inner(), counter, false)
+ },
+ |id, (odb, counter, has_error), _threads_left, _stop_everything| -> anyhow::Result<()> {
+ counter.fetch_add(1, Ordering::Relaxed);
+ if let Err(_err) = odb.header(id) {
+ *has_error = true;
+ gix::trace::error!(err = ?_err, "Object that is known to be present wasn't found");
+ }
+ Ok(())
+ },
+ || Some(std::time::Duration::from_millis(100)),
+ |(_, _, has_error)| has_error,
+ )?;
+
+ progress.show_throughput(start);
+ if errors.contains(&true) {
+ bail!("At least one object couldn't be looked up even though it must exist");
+ }
+ }
+
#[cfg(feature = "serde")]
{
serde_json::to_writer_pretty(out, &stats)?;
diff --git a/gitoxide-core/src/repository/revision/list.rs b/gitoxide-core/src/repository/revision/list.rs
index ab2bb2a60ed..7050bb6a667 100644
--- a/gitoxide-core/src/repository/revision/list.rs
+++ b/gitoxide-core/src/repository/revision/list.rs
@@ -17,7 +17,7 @@ pub const PROGRESS_RANGE: std::ops::RangeInclusive = 0..=2;
pub(crate) mod function {
use anyhow::{bail, Context};
- use gix::{hashtable::HashMap, traverse::commit::Sorting, Progress};
+ use gix::{hashtable::HashMap, traverse::commit::simple::Sorting, Progress};
use layout::{
backends::svg::SVGWriter,
core::{base::Orientation, geometry::Point, style::StyleAttr},
diff --git a/gitoxide-core/src/repository/revision/resolve.rs b/gitoxide-core/src/repository/revision/resolve.rs
index b4494e9e046..6e8a2b1ad65 100644
--- a/gitoxide-core/src/repository/revision/resolve.rs
+++ b/gitoxide-core/src/repository/revision/resolve.rs
@@ -127,11 +127,10 @@ pub(crate) mod function {
}
gix::object::Kind::Blob if cache.is_some() && spec.path_and_mode().is_some() => {
let (path, mode) = spec.path_and_mode().expect("is present");
- let is_dir = Some(mode.is_tree());
match cache.expect("is some") {
(BlobFormat::Git, _) => unreachable!("no need for a cache when querying object db"),
(BlobFormat::Worktree, cache) => {
- let platform = cache.attr_stack.at_entry(path, is_dir, &repo.objects)?;
+ let platform = cache.attr_stack.at_entry(path, Some(mode.into()), &repo.objects)?;
let object = id.object()?;
let mut converted = cache.filter.worktree_filter.convert_to_worktree(
&object.data,
diff --git a/gitoxide-core/src/repository/status.rs b/gitoxide-core/src/repository/status.rs
index ee36b1b1f3f..d3180f9c251 100644
--- a/gitoxide-core/src/repository/status.rs
+++ b/gitoxide-core/src/repository/status.rs
@@ -1,12 +1,8 @@
-use anyhow::{bail, Context};
-use gix::bstr::ByteSlice;
-use gix::{
- bstr::{BStr, BString},
- index::Entry,
- Progress,
-};
-use gix_status::index_as_worktree::{traits::FastEq, Change, Conflict, EntryStatus};
-use std::path::{Path, PathBuf};
+use anyhow::bail;
+use gix::bstr::{BStr, BString};
+use gix::status::index_worktree::iter::Item;
+use gix_status::index_as_worktree::{Change, Conflict, EntryStatus};
+use std::path::Path;
use crate::OutputFormat;
@@ -17,226 +13,196 @@ pub enum Submodules {
RefChange,
/// See if there are worktree modifications compared to the index, but do not check for untracked files.
Modifications,
+ /// Ignore all submodule changes.
+ None,
+}
+
+#[derive(Copy, Clone)]
+pub enum Ignored {
+ Collapsed,
+ Matching,
+}
+
+#[derive(Copy, Clone)]
+pub enum Format {
+ Simplified,
+ PorcelainV2,
}
pub struct Options {
- pub format: OutputFormat,
- pub submodules: Submodules,
+ pub ignored: Option,
+ pub format: Format,
+ pub output_format: OutputFormat,
+ pub submodules: Option,
pub thread_limit: Option,
pub statistics: bool,
pub allow_write: bool,
+ pub index_worktree_renames: Option,
}
pub fn show(
repo: gix::Repository,
pathspecs: Vec,
- out: impl std::io::Write,
+ mut out: impl std::io::Write,
mut err: impl std::io::Write,
- mut progress: impl gix::NestedProgress,
+ mut progress: impl gix::NestedProgress + 'static,
Options {
+ ignored,
format,
- // TODO: implement this
- submodules: _,
+ output_format,
+ submodules,
thread_limit,
allow_write,
statistics,
+ index_worktree_renames,
}: Options,
) -> anyhow::Result<()> {
- if format != OutputFormat::Human {
+ if output_format != OutputFormat::Human {
bail!("Only human format is supported right now");
}
- let mut index = repo.index_or_empty()?;
- let index = gix::threading::make_mut(&mut index);
- let mut progress = progress.add_child("traverse index");
- let start = std::time::Instant::now();
- let stack = repo
- .attributes_only(
- index,
- gix::worktree::stack::state::attributes::Source::WorktreeThenIdMapping,
- )?
- .detach();
- let pathspec = gix::Pathspec::new(&repo, false, pathspecs.iter().map(|p| p.as_bstr()), true, || {
- Ok(stack.clone())
- })?;
- let options = gix_status::index_as_worktree::Options {
- fs: repo.filesystem_options()?,
- thread_limit,
- stat: repo.stat_options()?,
- };
- let prefix = repo.prefix()?.unwrap_or(Path::new(""));
- let mut printer = Printer {
- out,
- changes: Vec::new(),
- prefix: prefix.to_owned(),
- };
- let filter_pipeline = repo
- .filter_pipeline(Some(gix::hash::ObjectId::empty_tree(repo.object_hash())))?
- .0
- .into_parts()
- .0;
- let ctx = gix_status::index_as_worktree::Context {
- pathspec: pathspec.into_parts().0,
- stack,
- filter: filter_pipeline,
- should_interrupt: &gix::interrupt::IS_INTERRUPTED,
- };
- let mut collect = gix::dir::walk::delegate::Collect::default();
- let (outcome, walk_outcome) = gix::features::parallel::threads(|scope| -> anyhow::Result<_> {
- // TODO: it's either this, or not running both in parallel and setting UPTODATE flags whereever
- // there is no modification. This can save disk queries as dirwalk can then trust what's in
- // the index regarding the type.
- // NOTE: collect here as rename-tracking needs that anyway.
- let walk_outcome = gix::features::parallel::build_thread()
- .name("gix status::dirwalk".into())
- .spawn_scoped(scope, {
- let repo = repo.clone().into_sync();
- let index = &index;
- let collect = &mut collect;
- move || -> anyhow::Result<_> {
- let repo = repo.to_thread_local();
- let outcome = repo.dirwalk(
- index,
- pathspecs,
- repo.dirwalk_options()?
- .emit_untracked(gix::dir::walk::EmissionMode::CollapseDirectory),
- collect,
- )?;
- Ok(outcome.dirwalk)
- }
- })?;
-
- let outcome = gix_status::index_as_worktree(
- index,
- repo.work_dir()
- .context("This operation cannot be run on a bare repository")?,
- &mut printer,
- FastEq,
- Submodule,
- repo.objects.clone().into_arc()?,
- &mut progress,
- ctx,
- options,
- )?;
-
- let walk_outcome = walk_outcome.join().expect("no panic")?;
- Ok((outcome, walk_outcome))
- })?;
-
- for entry in collect
- .into_entries_by_path()
- .into_iter()
- .filter_map(|(entry, dir_status)| dir_status.is_none().then_some(entry))
- {
- writeln!(
- printer.out,
- "{status: >3} {rela_path}",
- status = "?",
- rela_path = gix::path::relativize_with_prefix(&gix::path::from_bstr(entry.rela_path), prefix).display()
- )?;
+ if !matches!(format, Format::Simplified) {
+ bail!("Only the simplified format is currently implemented");
}
- if outcome.entries_to_update != 0 && allow_write {
- {
- let entries = index.entries_mut();
- for (entry_index, change) in printer.changes {
- let entry = &mut entries[entry_index];
- match change {
- ApplyChange::SetSizeToZero => {
- entry.stat.size = 0;
- }
- ApplyChange::NewStat(new_stat) => {
- entry.stat = new_stat;
+ let start = std::time::Instant::now();
+ let prefix = repo.prefix()?.unwrap_or(Path::new(""));
+ let index_progress = progress.add_child("traverse index");
+ let mut iter = repo
+ .status(index_progress)?
+ .should_interrupt_shared(&gix::interrupt::IS_INTERRUPTED)
+ .index_worktree_options_mut(|opts| {
+ if let Some((opts, ignored)) = opts.dirwalk_options.as_mut().zip(ignored) {
+ opts.set_emit_ignored(Some(match ignored {
+ Ignored::Collapsed => gix::dir::walk::EmissionMode::CollapseDirectory,
+ Ignored::Matching => gix::dir::walk::EmissionMode::Matching,
+ }));
+ }
+ opts.rewrites = index_worktree_renames.map(|percentage| gix::diff::Rewrites {
+ copies: None,
+ percentage: Some(percentage),
+ limit: 0,
+ });
+ if opts.rewrites.is_some() {
+ if let Some(opts) = opts.dirwalk_options.as_mut() {
+ opts.set_emit_untracked(gix::dir::walk::EmissionMode::Matching);
+ if ignored.is_some() {
+ opts.set_emit_ignored(Some(gix::dir::walk::EmissionMode::Matching));
}
}
}
+ opts.thread_limit = thread_limit;
+ opts.sorting = Some(gix::status::plumbing::index_as_worktree_with_renames::Sorting::ByPathCaseSensitive);
+ })
+ .index_worktree_submodules(match submodules {
+ Some(mode) => {
+ let ignore = match mode {
+ Submodules::All => gix::submodule::config::Ignore::None,
+ Submodules::RefChange => gix::submodule::config::Ignore::Dirty,
+ Submodules::Modifications => gix::submodule::config::Ignore::Untracked,
+ Submodules::None => gix::submodule::config::Ignore::All,
+ };
+ gix::status::Submodule::Given {
+ ignore,
+ check_dirty: false,
+ }
+ }
+ None => gix::status::Submodule::AsConfigured { check_dirty: false },
+ })
+ .into_index_worktree_iter(pathspecs)?;
+
+ for item in iter.by_ref() {
+ let item = item?;
+ match item {
+ Item::Modification {
+ entry: _,
+ entry_index: _,
+ rela_path,
+ status,
+ } => print_index_entry_status(&mut out, prefix, rela_path.as_ref(), status)?,
+ Item::DirectoryContents {
+ entry,
+ collapsed_directory_status,
+ } => {
+ if collapsed_directory_status.is_none() {
+ writeln!(
+ out,
+ "{status: >3} {rela_path}{slash}",
+ status = "?",
+ rela_path =
+ gix::path::relativize_with_prefix(&gix::path::from_bstr(entry.rela_path), prefix).display(),
+ slash = if entry.disk_kind.unwrap_or(gix::dir::entry::Kind::File).is_dir() {
+ "/"
+ } else {
+ ""
+ }
+ )?;
+ }
+ }
+ Item::Rewrite {
+ source,
+ dirwalk_entry,
+ copy: _, // TODO: how to visualize copies?
+ ..
+ } => {
+ // TODO: handle multi-status characters, there can also be modifications at the same time as determined by their ID and potentially diffstats.
+ writeln!(
+ out,
+ "{status: >3} {source_rela_path} → {dest_rela_path}",
+ status = "R",
+ source_rela_path =
+ gix::path::relativize_with_prefix(&gix::path::from_bstr(source.rela_path()), prefix).display(),
+ dest_rela_path = gix::path::relativize_with_prefix(
+ &gix::path::from_bstr(dirwalk_entry.rela_path.as_ref()),
+ prefix
+ )
+ .display(),
+ )?;
+ }
}
- index.write(gix::index::write::Options {
- extensions: Default::default(),
- skip_hash: false, // TODO: make this based on configuration
- })?;
}
-
- if statistics {
- writeln!(err, "{outcome:#?}").ok();
- writeln!(err, "{walk_outcome:#?}").ok();
+ if gix::interrupt::is_triggered() {
+ bail!("interrupted by user");
}
- writeln!(err, "\nhead -> index and untracked files aren't implemented yet")?;
- progress.show_throughput(start);
- Ok(())
-}
-
-#[derive(Clone)]
-struct Submodule;
-
-impl gix_status::index_as_worktree::traits::SubmoduleStatus for Submodule {
- type Output = ();
- type Error = std::convert::Infallible;
+ let out = iter.outcome_mut().expect("successful iteration has outcome");
- fn status(&mut self, _entry: &Entry, _rela_path: &BStr) -> Result