Skip to content

fix(deps): update rust crate gix to 0.85.0 - #480

Merged
andrius-puksta-sensmetry merged 1 commit into
mainfrom
renovate/gix-0.x
Jul 27, 2026
Merged

fix(deps): update rust crate gix to 0.85.0#480
andrius-puksta-sensmetry merged 1 commit into
mainfrom
renovate/gix-0.x

Conversation

@renovate

@renovate renovate Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change Pending
gix dependencies minor 0.83.00.85.0 0.86.0

Release Notes

GitoxideLabs/gitoxide (gix)

v0.85.0: gix v0.85.0

Compare Source

Bug Fixes (BREAKING)
  • avoid duplicate network connection when adopting a remote-controlled hash kind.
    Connections can now be created from detached remotes, internally,
    which makes them independent of the underlying repository.

    This is breaking as it comes with a cleanup of Connection lifetimes,
    which will break anyone who stores them in a struct. So hopefully
    nobody is affected.

  • bound the clone object-hash adoption retry
    The clone fetch loop adopts the remote's object format and retries when
    it differs from the freshly initialized local repository. Adoption makes
    the next iteration's hashes match, but if the reopened repository somehow
    still disagrees the loop would re-handshake forever. Track whether we
    already retried and fail with IncompatibleObjectHash on a second mismatch
    instead. The error variant is introduced here, as this is its only user.

    Also silence clippy::never_loop on default (sha1) features, where the
    sha256-gated continue is absent and the loop always returns first pass.

New Features (BREAKING)
  • add leaf-only tree-editor removal via Editor::remove_leaf()
    Motivation comes from gitbutlerapp/gitbutler#14312,
    where callers had to split tree-entry deletions from additions to avoid
    accidentally deleting a newly-added subtree after adding A/one and then deleting
    A.

    Add Editor::remove_leaf() to gix-object and expose it through gix object tree
    editors and cursors. The new API keeps remove() behavior unchanged, remains
    tolerant of absent paths, but returns an error when the target entry exists and
    is a tree.

Bug Fixes
  • adopt the remote's object format when cloning
    A clone into a freshly initialized repository hit an unimplemented!
    panic when the remote used sha256, since the local repository defaults
    to sha1.

    Reconfigure the still-empty local repository to the remote's object
    format and retry the fetch, matching git's behavior of inheriting
    the remote's hash on clone.

    Without the sha256 feature gix_hash::Kind has a single variant, so the
    local and remote hashes can never differ; the mismatch check is compiled
    out entirely in that case.

  • write fetched remote symrefs as direct refs
    Previously gix had made-up behaviour to 'improve' on standard Git,
    but it's clear this isn't backed up or tested well enough to be worth
    the risk of introducing subtle or not so subtle bugs.

  • resolve remote HEAD fetches against remote refs
    Fetching a local transport remote with a refspec like +HEAD:refs/test/repo could
    write a symbolic local ref to the client repository's refs/heads/main when the
    remote HEAD was symbolic and the client happened to have a same-named branch.
    That made the fetched destination resolve to the local branch instead of the
    remote HEAD object.

    Add a fetch regression that creates distinct local and remote
    repositories with matching HEAD target names but different commits, then fetches
    +HEAD:refs/test/repo and asserts the destination is the remote object as a
    direct ref.

    Match Git behavior observed with the local Git checkout: git fetch
    +HEAD:refs/test/repo creates refs/test/repo as the remote HEAD object, and Git's
    remote.c resolves symrefs against the advertised remote ref list.

    Fix the unmapped remote-symbolic-ref fallback to peel born remote symrefs to
    their advertised object id instead of consulting local refs. Mapped symrefs
    still rewrite to their corresponding local tracking ref, and unborn remote refs
    remain symbolic.

  • set trust for GIT_DIR environment discovery
    A Helix user reported that opening a repository with GIT_DIR set could panic in
    gix while discovering a repository through environment overrides. The reported
    reproductions used GIT_DIR=.git with Helix or git --git-dir=.git invoking an
    editor, and the panic came from open_from_paths() expecting git-dir trust to
    have already been determined.

    The GIT_DIR override path in open_with_environment_overrides() already
    determines ownership trust for the effective git directory and selects options
    from the trust mapping, but it did not store that trust in the Options passed to
    open_from_paths(). Store the determined trust there, matching discover_opts(),
    so configuration loading receives an explicit trust value instead of reaching
    the internal expect().

    Git baseline: git --git-dir=<repo/.git> --work-tree=<repo> status --short exits successfully.

  • reject implicit sha1 repos in sha256-only builds
    A missing extensions.objectFormat means legacy Sha1.

    In sha256-only builds, Kind::default() is Sha256, so such repos
    were silently mislabeled as Sha256.

    Resolve the implicit case to Sha1 when supported, else error
    out to avoid any mislabeling.

    Also reject extensions.objectFormat when repositoryFormatVersion is 0,
    matching git, which treats it as an invalid v1-only extension.

  • handle loose ref path-prefix collisions
    The GitButler branch creation flow reported that
    repo.try_find_reference("refs/heads/A/new") could fail with a low-level
    NotADirectory error when refs/heads/A already exists as a loose ref. That
    lookup is asking whether the longer ref exists; the path-prefix collision
    matters to creation/update code, but find should report absence for that
    candidate.

    Git reference: refs/refs-internal.h documents ENOTDIR as the case where a
    ref prefix is not a directory, alongside ENOENT for non-existing refs. For
    lookup, both mean the requested ref candidate was not found.

  • write new remote sections to the local config file.

  • Add support for gix_object::Write::*with_known_id() and use it.
    This means the Repository::write_object() won't recalculate the hash.

  • handle relative worktree gidir files
    Git 2.48 can link worktrees with relative paths. In that layout the checkout
    .git file points at the private git dir relative to the checkout, while
    worktrees//gitdir points back to the checkout relative to the private git
    dir.

    Discovery already handled the checkout-side gitdir file, but paths read from the
    private git dir were treated as-is. That made discovery from .git/worktrees/
    and Repository::worktrees() proxy base resolution produce relative paths
    anchored to the process cwd instead of the gitdir file location.

    Git reference: /Users/byron/dev/github.com/git/git
    worktree.c:write_worktree_linking_files writes both relative links with
    relative_path(), and t/t2400-worktree-add.sh covers the resulting relative
    files.

  • fetching and cloning with refspecs that are tags (in shallow clones)
    Fix shallow clone refspecs for explicit tag refs

    When a shallow clone was created with with_ref_name(), the clone
    setup treated the requested name as a branch and generated a refspec
    under refs/heads/. For tag names this produced an unmatched required
    mapping like +refs/heads/<tag>:refs/remotes/origin/<tag>.

    Resolve the requested ref name against the remote before constructing
    the shallow single-ref refspec. Branches continue to map to
    refs/remotes/<remote>/*, while tags and other non-branch refs map to
    themselves.

    Baseline Git behavior was checked with /Users/byron/dev/github.com/git/git:
    non-shallow --branch <tag> clones keep the normal branch wildcard
    fetch refspec, while shallow --depth 1 --branch <tag> clones store
    +refs/tags/<tag>:refs/tags/<tag>.

  • reject deleted prior checkout branches

Commit Statistics
  • 49 commits contributed to the release over the course of 27 calendar days.
  • 27 days passed between releases.
  • 14 commits were understood as conventional.
  • 3 unique issues were worked on: #​1951, #​2609, #​2613
Commit Details
view details
  • #​1951
    • Write new remote sections to the local config file. (9ad2e24)
  • #​2609
    • Reject deleted prior checkout branches (6b5c2ea)
  • #​2613
    • Resolve remote HEAD fetches against remote refs (6730316)
  • Uncategorized
    • Merge pull request #​2642 from 10ne1/dev/aratiu/sha256-transport (da6b267)
    • Avoid duplicate network connection when adopting a remote-controlled hash kind. (9929ece)
    • Review (ed998d1)
    • Map fetch pack/index checksums to their SHA-256 values (325d2a1)
    • Derive update_refs expected ids from the fixture (hash-aware) (470e689)
    • Cover sha256 remote object-format adoption on clone (77e11be)
    • Bound the clone object-hash adoption retry (28b726d)
    • Adopt the remote's object format when cloning (e7c7484)
    • Merge pull request #​2660 from GitoxideLabs/resolve-fetch-head-againnst-remote-refs (a8c5257)
    • Adjust clone expectations for peeled remote symrefs (00f64fc)
    • Write fetched remote symrefs as direct refs (fa42565)
    • Merge pull request #​2622 from ameyypawar/tests/repository-mailmap (3755396)
    • Review (590b206)
    • Merge pull request #​2654 from GitoxideLabs/tree-editor-improvement (f051396)
    • Add leaf-only tree-editor removal via Editor::remove_leaf() (cd610db)
    • Add tests for Repository::open_mailmap and open_mailmap_into (73ffc99)
    • Merge pull request #​2637 from ameyypawar/fix-remote-save-1951 (847eb4a)
    • Review (5217d66)
    • Merge pull request #​2652 from GitoxideLabs/override-upward-trust (52d26d7)
    • Adjust the comment in discovery_opts to inform about upwards::Options trust handling. (7ba53e1)
    • Merge pull request #​2651 from GitoxideLabs/allow-sha256-only-builds (f1f8b6f)
    • Address review feedback about repository formats (2a5b8d4)
    • Merge pull request #​2648 from GitoxideLabs/investigate-git-dir-panic (5dfb44d)
    • Set trust for GIT_DIR environment discovery (3b4a6bc)
    • Review (c391a12)
    • Cover the sha256-only legacy object-hash path (14a1a11)
    • Test rejection of objectFormat on version-0 repositories (ad9354e)
    • Reject implicit sha1 repos in sha256-only builds (b859b92)
    • Allow sha256-only builds (b0155ce)
    • Merge pull request #​2645 from GitoxideLabs/try-find-reference-path-prefix-collision (4f089fc)
    • Handle loose ref path-prefix collisions (9f432ef)
    • Merge pull request #​2628 from GitoxideLabs/dependabot/cargo/tar-0.4.46 (5aadd6e)
    • Thanks clippy (137794d)
    • Merge pull request #​2598 from cruessler/run-gix-index-tests-with-sha-256 (b5b2d54)
    • Review (bc4064c)
    • Merge pull request #​2549 from GitoxideLabs/no-dupl-compute (69caccd)
    • Add support for gix_object::Write::*with_known_id() and use it. (2bd9dfe)
    • Merge pull request #​2599 from GitoxideLabs/relative-workree-path (a209dc1)
    • Address auto-review (1d80b47)
    • Handle relative worktree gidir files (bd2881e)
    • Merge pull request #​2556 from GitoxideLabs/shallow-clone-tag-refspecs (3dd621c)
    • Address auto-review (0c1645a)
    • Finally implement find_custom_refname as in Git (7734fb0)
    • Fetching and cloning with refspecs that are tags (in shallow clones) (92c8130)
    • Merge pull request #​2610 from GitoxideLabs/fix-rev-parse (a4be01b)
    • Merge pull request #​2618 from GitoxideLabs/report (f7d4f33)

v0.84.0: gix v0.84.0

Compare Source

New Features (BREAKING)
  • Allow checkouts of empty repositories
    Also make turn destination_must_be_empty into Option<bool>
New Features
  • Add SHA-256 support for object-format parsing.
Bug Fixes
  • Follow submodule gitdir files when opening and perform basic validation
    Modern submodules store a .git file in the worktree whose gitdir: value points
    at the repository to open. The previous resolver treated every non-directory
    .git path like an uninitialized submodule and fell back to .git/modules/,
    which can open the wrong repository after a submodule gitdir is relocated or
    renamed. That shows up as phantom submodule HEAD changes in gix status.

    Git baseline: Git setup.c::read_gitfile_gently() parses gitdir:
    files and resolves relative targets against the .git file location;
    submodule.c::submodule_to_gitdir() consults that gitfile before falling back to
    the name-derived .git/modules path.

    Update Submodule::git_dir_try_old_form() to validate the submodule name, then
    follow worktree .git files when present while preserving the old-form directory
    and uninitialized fallback behavior. Validate present gitdir file targets for
    direct state/open/status queries so broken submodule checkouts are reported
    if the gitlink doesn't point to a directory.
    For status ignore=all, still parse valid gitdir files to keep state accurate,
    but skip target validation and fall back without error if the gitdir file itself
    is malformed or unreadable. Derive State::is_old_form directly from whether
    the worktree .git path is a directory so a divergent modern gitlink is not
    misclassified as old form.

  • Repository::is_dirty() won't fail on unborn repositories

Commit Statistics
  • 37 commits contributed to the release over the course of 28 calendar days.
  • 28 days passed between releases.
  • 4 commits were understood as conventional.
  • 2 unique issues were worked on: #, #​2585
Commit Details
view details
  • #
    • Repository::is_dirty() won't fail on unborn repositories (1f82a9f)
  • #​2585
    • Follow submodule gitdir files when opening and perform basic validation (82c483a)
  • Uncategorized
    • Merge pull request #​2595 from cruessler/add-hex-to-id-sha1-only (87433ed)
    • Review (f962ed1)
    • Add hex_to_id_sha1_only, use in SHA-1 only tests (d80c534)
    • Merge pull request #​2508 from j-walther/feat/allow-empty-dir (9013c3f)
    • Review (8606b7a)
    • Allow checkouts of empty repositories (e75fbfa)
    • Merge pull request #​2578 from cruessler/run-gix-tests-with-sha-256 (2d4a6f2)
    • Review (31c2de3)
    • Return SHA-1 when there's no corresponding SHA-256 (b8510b2)
    • Feat! add object_hash to gix::create::Options (b123b4c)
    • Merge pull request #​2588 from GitoxideLabs/fix/gix-status-phantom-submodule-modifications-2585 (db925ec)
    • Merge pull request #​2589 from GitoxideLabs/fix-status-in-unborn-repo (ba7d9a4)
    • Address auto-review (5a37fbd)
    • Add another test to learn what is_dirty() does when there are modifications. (3406b1d)
    • Merge pull request #​2581 from GitoxideLabs/improvements (8af2691)
    • Add SHA-256 support for object-format parsing. (011316e)
    • Merge pull request #​2583 from tisonkun/patch-1 (a791ea3)
    • Improve comment in object/commit.rs (a8f7717)
    • Merge pull request #​2573 from cruessler/run-gix-traverse-tests-with-sha-256 (278d7ec)
    • Address auto-review (0ec3bb7)
    • Cleanup the justfile and automate feature tests (db7b97b)
    • Cleanup sha1 feature in gix to just set what's needed. (16a6fc4)
    • Merge pull request #​2575 from SarthakB11/fix/issue-2316 (4743361)
    • Review (1980190)
    • Document why each fixture archive is .gitignored (e3d5a04)
    • Merge pull request #​2568 from GitoxideLabs/dependabot/cargo/cargo-56d6b174d8 (ab2fee1)
    • Update crates to Rust 2024 edition (2cb17b2)
    • Raise MSRV for hash dependency updates (3675a8d)
    • Merge pull request #​2559 from GitoxideLabs/fix/symlink-prefix-reuse-worktree-escape-GHSA-f89h-2fjh-2r9q (3af9b4a)
    • Release gix-fs v0.21.1 (d3e4c17)
    • Address auto-review (1d9bae2)
    • Add clone reproducer for symlink prefix reuse checkout escape (c2ae6cd)
    • Merge pull request #​2543 from cruessler/run-gix-worktree-stream-tests-with-sha-256 (23af41a)
    • Adapt to changes in gix_object::Data (4309fa4)
    • Merge pull request #​2546 from GitoxideLabs/fix-2545 (adb8328)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@andrius-puksta-sensmetry
andrius-puksta-sensmetry merged commit 6be1956 into main Jul 27, 2026
59 checks passed
@andrius-puksta-sensmetry
andrius-puksta-sensmetry deleted the renovate/gix-0.x branch July 27, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant