Skip to content

update gix #14869

Merged
Byron merged 1 commit into
masterfrom
gix-upgrade
Jul 20, 2026
Merged

update gix #14869
Byron merged 1 commit into
masterfrom
gix-upgrade

Conversation

@Byron

@Byron Byron commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator
  • fixes panic in ODB, easily caused after fetch
  • better gix-config API and improved performance

Tasks

  • review
  • restore previous remote.url() handling. Being too Git compatible is wrong if we don't get reasonable URLs. (needs update gix  #14869)

@github-actions github-actions Bot added rust Pull requests that update Rust code CLI The command-line program `but` labels Jul 19, 2026
@Byron
Byron force-pushed the gix-upgrade branch 2 times, most recently from 3056496 to 07d1fbd Compare July 19, 2026 21:03
@Byron
Byron marked this pull request as ready for review July 19, 2026 21:04
@Byron
Byron requested a review from krlvi as a code owner July 19, 2026 21:04
Copilot AI review requested due to automatic review settings July 19, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the workspace’s pinned gix/gitoxide revision and adapts GitButler’s Rust crates to the updated gix config/remote APIs, aiming to avoid an ODB panic after fetch and benefit from config API/performance improvements.

Changes:

  • Bump gix and gix-testtools git revisions in the workspace (and refresh Cargo.lock accordingly).
  • Update call sites to new gix-config APIs (notably config getters and section mutation helpers) and adjust type/lifetime usage (e.g., gix::config::File, gix::remote::Names).
  • Refactor various remote-name and ref-name utilities to use the updated gix remote naming types.

Reviewed changes

Copilot reviewed 40 out of 41 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/gitbutler-repo/src/managed_hooks.rs Adapt core.hooksPath retrieval to new trusted_path() return shape.
crates/gitbutler-repo/src/commands.rs Update remote lookup and config writing for remotes to new gix APIs.
crates/gitbutler-project/src/controller.rs Update config value comparisons to use slice accessors.
crates/gitbutler-branch/src/reference_ext.rs Switch remote-name inputs from custom sets to gix::remote::Names.
crates/gitbutler-branch-actions/src/branch.rs Propagate gix::remote::Names usage through branch identity resolution and tests.
crates/but/src/command/legacy/setup.rs Update writing of remote.*.url to the new config section API.
crates/but/src/command/legacy/push.rs Adjust handling of remote ref return types (ownership changes).
crates/but/src/command/legacy/branch/show.rs Update config file type signature to new gix::config::File form.
crates/but/src/command/git_config.rs Update edit closure signature to new gix::config::File type.
crates/but/src/command/config.rs Update AI git-config editing helpers to new gix::config::File type.
crates/but/src/command/alias.rs Update config section set/push APIs and config file type signatures.
crates/but-workspace/tests/workspace/upstream_integration.rs Update raw config mutation calls to new key argument type.
crates/but-workspace/src/ref_info.rs Simplify/adjust remote names collection under new gix::remote::Names behavior.
crates/but-workspace/src/lib.rs Update stored remote name type to new gix::remote::Names form.
crates/but-workspace/src/legacy/push.rs Update remote names parameter type to new gix::remote::Names form.
crates/but-workspace/src/branch/apply.rs Update local tracking config persistence to new config APIs and types.
crates/but-secret/src/secret.rs Update stored config/prompt option types to new non-'static forms.
crates/but-rebase/src/commit.rs Adjust path ownership handling per updated gix APIs.
crates/but-project-handle/src/storage_path.rs Update trusted_path() matching to new Result<Option<_>> shape.
crates/but-llm/src/openrouter.rs Update git-config reading signatures to new gix::config::File type.
crates/but-llm/src/openai.rs Update git-config reading signatures to new gix::config::File type.
crates/but-llm/src/ollama.rs Update git-config reading signatures to new gix::config::File type.
crates/but-llm/src/lmstudio.rs Update git-config reading signatures to new gix::config::File type.
crates/but-llm/src/lib.rs Update provider initialization signature to new gix::config::File type.
crates/but-llm/src/client.rs Update LLMClient trait signature to new gix::config::File type.
crates/but-llm/src/anthropic.rs Update git-config reading signatures to new gix::config::File type.
crates/but-graph/src/projection/workspace/api/mod.rs Adjust remote-name collection to work with updated gix::remote::Names.
crates/but-graph/src/init/overlay.rs Adapt overlay wrapper return types to new ownership expectations.
crates/but-core/tests/core/branch/canned_refname.rs Update raw config mutation calls to new key argument type.
crates/but-core/src/settings.rs Update config string/program retrieval types away from Cow to owned bytes.
crates/but-core/src/repo_ext.rs Update config file return types to new gix::config::File form.
crates/but-core/src/ref_metadata.rs Update config parsing helpers for ref names and booleans to new return types.
crates/but-core/src/lib.rs Update extract_remote_name_and_short_name signature to new Names type.
crates/but-core/src/git_config.rs Update config open/edit/write helpers for new gix config mutation APIs.
crates/but-core/src/commit/mod.rs Update commit signing config access patterns per updated trusted_path() API.
crates/but-core/src/branch/mod.rs Adjust return type ownership for tracking branch resolution.
crates/but-api/src/workspace.rs Update remote-name conversion for target-branch derivation under new Names type.
crates/but-api/src/legacy/git.rs Update config accessor signature to new gix::config::File type.
crates/but-api/src/legacy/forge.rs Update remote lookup and config writing to new gix APIs.
Cargo.toml Bump pinned git revision for gix/gix-testtools (and patch override).
Cargo.lock Refresh lockfile to reflect updated gitoxide revision and transitive dependency changes.

Comment thread crates/but-core/src/commit/mod.rs Outdated
- fixes panic in ODB, easily caused after fetch
- better gix-config API and improved performance

Co-authored-by: GPT 5.6 <codex@openai.com>
Copilot AI review requested due to automatic review settings July 19, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 41 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

crates/but-core/src/commit/mod.rs:379

  • The context string mentions user.signingKey, but the config key being read is user.signingkey (lowercase k). Keeping the message consistent with the actual key avoids confusion when debugging trust issues.
            let signing_key = config
                .trusted_path("user.signingkey")?
                .with_context(|| format!("Didn't trust 'user.signingKey': {signing_key}"))?;

@Byron
Byron merged commit 5525642 into master Jul 20, 2026
46 checks passed
@Byron
Byron deleted the gix-upgrade branch July 20, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI The command-line program `but` rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants