Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
449db91
change(gix-packetline)!: migrate errors to gix-error
codex Aug 20, 2026
de1716a
change(gix-config-value)!: migrate errors to gix-error
codex Aug 20, 2026
8c101c9
change(gix-object)!: migrate errors to gix-error
codex Aug 20, 2026
264f961
change(gix-refspec)!: migrate errors to gix-error
codex Aug 20, 2026
2abea43
change(gix-shallow)!: migrate errors to gix-error
codex Aug 20, 2026
9bfec72
change(gix-pathspec)!: migrate errors to gix-error
codex Aug 20, 2026
bd01b36
change(gix-prompt)!: migrate errors to gix-error
codex Aug 20, 2026
a6113cb
change(gix-revwalk)!: migrate errors to gix-error
codex Aug 20, 2026
ac0dca1
change(gix-traverse)!: migrate errors to gix-error
codex Aug 20, 2026
35a6e52
change(gix-discover)!: migrate errors to gix-error
codex Aug 20, 2026
d036063
change(gix-credentials)!: migrate errors to gix-error
codex Aug 20, 2026
2c08f90
change(gix-dir)!: migrate errors to gix-error
codex Aug 20, 2026
15dd98f
change(gix-status)!: migrate errors to gix-error
codex Aug 20, 2026
cbe793b
change(gix-blame)!: migrate errors to gix-error
codex Aug 20, 2026
cf7803b
change(gix-worktree-state)!: migrate errors to gix-error
codex Aug 20, 2026
2ab0173
change(gix-submodule)!: migrate errors to gix-error
codex Aug 20, 2026
64865b1
change(gitoxide-core)!: migrate errors to gix-error
codex Aug 20, 2026
7670cef
change(gix-config)!: migrate errors to gix-error
codex Aug 20, 2026
61ec953
change(gix-diff)!: migrate errors to gix-error
codex Aug 20, 2026
69b33f0
change(gix-index)!: migrate errors to gix-error
codex Aug 20, 2026
4662901
change(gix-filter)!: migrate errors to gix-error
codex Aug 20, 2026
7d42d81
change(gix-merge)!: migrate errors to gix-error
codex Aug 20, 2026
5d71252
change(gix-protocol)!: migrate errors to gix-error
codex Aug 20, 2026
f28f7df
change(gix-pack)!: migrate errors to gix-error
codex Aug 20, 2026
f52b529
change(gix-odb)!: migrate errors to gix-error
codex Aug 20, 2026
1487c6f
change(gix-ref)!: migrate errors to gix-error
codex Aug 20, 2026
2c373b2
change(gix-transport)!: migrate errors to gix-error
codex Aug 20, 2026
b1e31eb
change(gix)!: consolidate public API failures under gix::Error
codex Aug 20, 2026
aa83527
fix(gix-worktree-stream): preserve allocation failure sources
codex Aug 29, 2026
2176245
change(gix)!: remove redundant error aliases
codex Sep 6, 2026
daf73b5
Use borrowed error inspection throughout the workspace
codex Sep 15, 2026
ba2c7f2
Use implicit error conversion at `gix` API boundaries
codex Sep 15, 2026
9d0329a
Add error context without preliminary erasure
codex Sep 15, 2026
807275e
Use borrowed exception retry policies in workspace tests
codex Sep 16, 2026
ac88bd7
fix(gix-error): preserve classifications in custom I/O payloads
Byron Sep 17, 2026
348af0b
fix(gix-validate): preserve validation classifications after error co…
Byron Sep 17, 2026
045519d
fix(gix-command): classify malformed command lines
codex Sep 17, 2026
0cec256
fix(gix-tempfile): expose persistence I/O errors as sources
codex Sep 17, 2026
82776d9
feat(gix-error): inspect borrowed error classifications lazily
Byron Sep 17, 2026
b692589
fix(gix-revision)!: preserve merge-base lookup failures
codex Sep 17, 2026
1068667
fix(gix-transport): preserve HTTP callback and port parsing failures
codex Sep 17, 2026
e79baac
fix(gix-pack): reject delta instructions that exceed the result size
codex Sep 17, 2026
0b2a5c4
fix(gix): propagate failed fetch ancestry checks
Byron Sep 17, 2026
dcf08a4
fix(gix)!: preserve causes across fallible conversions
codex Sep 17, 2026
f042b3b
Add tasks for Zed to run crate tests with many features
Byron Sep 23, 2026
dcdddd9
feat(gix-error): attach scalar metadata to error contexts
Byron Sep 17, 2026
fb36616
change(gix-ref)!: replace forwarding errors with metadata and recover…
codex Sep 17, 2026
baff04f
change(gix-odb)!: replace forwarding errors with metadata contexts
Byron Sep 17, 2026
faf8510
feat(gix-testtools): redact unstable values in diagnostic snapshots
Byron Sep 24, 2026
f79ab74
Exclude Rust tests and examples from `CodeQL` analysis
Byron Sep 24, 2026
da0f21d
change(gix-error)!: unify diagnostics as `Message` and preserve causes
codex Sep 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ jobs:
build-mode: none
- language: rust
build-mode: none
# Path exclusions work with `none`; inline unit tests remain in scope.
config: |
paths-ignore:
- '**/examples/**'
- '**/tests/**'
- '**/fuzz/**'
- '**/benches/**'
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
Expand All @@ -82,6 +89,7 @@ jobs:
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config: ${{ matrix.config }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ $**/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.

# Share Zed tasks even when editor files are ignored globally; keep other Zed settings local.
!/.zed/
/.zed/*
!/.zed/tasks.json
233 changes: 233 additions & 0 deletions .zed/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
// Feature-specific test configurations, with both hashes enabled where applicable.
// gix-transport has no hash toggles, so enable them on its gix-hash dev-dependency.
// gix-error tests enable anyhow through a dev-dependency; tree-error overrides auto-chain-error.
[
{
"label": "test gix-error (default tree)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-error",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-error (auto-chain-error)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-error",
"--features",
"auto-chain-error",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-error (auto-chain-error, tree-error)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-error",
"--features",
"auto-chain-error,tree-error",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-protocol (blocking-client)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-protocol",
"--features",
"blocking-client,sha1,sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-protocol (async-client)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-protocol",
"--features",
"async-client,sha1,sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-transport (curl)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-transport",
"--features",
"http-client-curl,gix-hash/sha1,gix-hash/sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-transport (curl, insecure HTTP credentials)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-transport",
"--features",
"http-client-curl,http-client-insecure-credentials,gix-hash/sha1,gix-hash/sha256",
"--test",
"blocking-transport-http-only",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-transport (reqwest)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-transport",
"--features",
"http-client-reqwest,gix-hash/sha1,gix-hash/sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-transport (reqwest, insecure HTTP credentials)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-transport",
"--no-default-features",
"--features",
"blocking-client,http-client-reqwest,http-client-insecure-credentials,gix-hash/sha1,gix-hash/sha256",
"--test",
"blocking-transport",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix-transport (async-client)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix-transport",
"--features",
"async-client,gix-hash/sha1,gix-hash/sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix (basic, comfort, max-performance-safe)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix",
"--no-default-features",
"--features",
"basic,comfort,max-performance-safe,sha1,sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix (basic, extras, comfort)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix",
"--no-default-features",
"--features",
"basic,extras,comfort,sha1,sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix (async-network-client)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix",
"--features",
"async-network-client,sha1,sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix (blocking-network-client)",
"command": "cargo",
"args": [
"nextest",
"run",
"-p",
"gix",
"--features",
"blocking-network-client,sha1,sha256",
"--no-fail-fast"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
},
{
"label": "test gix (async-std, flaky)",
"command": "cargo",
"args": [
"test",
"-p",
"gix",
"--features",
"async-network-client-async-std,sha1,sha256"
],
"cwd": "$ZED_WORKTREE_ROOT",
"env": { "GIX_TEST_IGNORE_ARCHIVES": "1" }
}
]
16 changes: 13 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,31 @@ Plumbing crates are migrating from `thiserror` enums to `gix-error`. Check wheth
uses `gix-error` (look at its `Cargo.toml`); if it does, follow the patterns below. If it still uses
`thiserror`, keep using `thiserror` for consistency within that crate.

- **Error type alias**: `pub type Error = gix_error::Exn<gix_error::Message>;`
- **Error types**: use `gix_error::Exn`, `gix_error::Exn<gix_error::Message>`, or the appropriate
concrete error directly, importing types under their canonical names as needed. Do not introduce
crate-specific or operation-specific forwarding aliases or renamed error exports.
- **Exception results**: use `ExnResult<T, E>` for results with `Exn<E>` errors.
It defaults to `T = ()` and `E = gix_error::exn::Untyped`: use `ExnResult<T>` for erased errors,
bare `ExnResult` for erased unit results, and `ExnMessageResult<T>` for message contexts.
`ExnMessageResult` also defaults to unit success. Preserve concrete error types when adapting signatures.
Always import `ExnResult` and `ExnMessageResult` directly from `gix_error` (or their `gix` re-exports)
and use their bare names in signatures.
- **Porcelain errors**: use the central `gix::Error` re-export at public API boundaries. Keep the
underlying error type and any `Exn` parameter when adapting an existing signature.
- **Static messages**: `gix_error::message("something failed")`
- **Formatted messages**: `gix_error::message!("failed to read {path}")`
- **Wrapping callee errors with context**: `.or_raise(|| message("context about what failed"))?`
- **Standalone error (no callee)**: `Err(message("something went wrong").raise())`
- **Wrapping an `impl Error` with context**: `err.and_raise(message("context"))`
- **Closure/callback bounds**: use `Result<T, Exn>` (bare), not `Exn<Message>`;
- **Closure/callback bounds**: use `ExnResult<T>` with the default erased error type;
inside the function, convert with `.or_raise(|| message("..."))?`;
inside the closure, convert typed to bare with `.or_erased()`
- **`Exn<E>` does NOT implement `std::error::Error`** — this is by design.
- To convert: use `.into_error()` to get `gix_error::Error` (which does implement `std::error::Error`)
- Example: `std::io::Error::other(exn.into_error())`
- **In tests** returning `gix_testtools::Result` (= `Result<(), Box<dyn Error>>`), `Exn` can't be used
with `?` directly — use `.map_err(|e| e.into_error())?`
- **Common imports**: `use gix_error::{message, ErrorExt, ResultExt};`
- **Common imports**: `use gix_error::{message, ErrorExt, ExnMessageResult, ExnResult, ResultExt};`
- See `gix-error/src/lib.rs` module docs for a full migration guide from `thiserror`

### Commit Messages
Expand Down
Loading
Loading