Skip to content

gix v0.86.0

Choose a tag to compare

@Byron Byron released this 23 Jul 13:24
842bc44

New Features (BREAKING)

  • use dir-cache for accelerated status calls on Windows

Changed (BREAKING)

  • replace maybe-async with bisync.
    Replace the globally feature-selected maybe-async dependency with bisync 0.3 and
    re-export the locally selected macro mode from gix-protocol.

    Also use it to deduplicate portions which previously couldn't be handled.

  • adapt to lifetime-free configuration files in gix-config
    Update repository configuration storage, snapshots, overrides, and caches
    to use the self-contained gix_config::File representation. Configuration
    can now move through repository initialization, cloning, and remote setup
    without artificial input lifetimes or conversions to 'static.

    • Return owned BString, PathBuf, OsString, and FullName values
      from configuration-derived lookups.
    • Simplify fallible optional access from Option<Result<T, E>> to
      Result<Option<T>, E>, allowing errors to propagate naturally with
      ?.
    • Accept common string and byte-string inputs through AsBStr in
      configuration setters, converters, remote lookup, and remote saving.
    • Remove widespread Cow construction, into_owned(), and redundant
      cloning from configuration consumers.
    • Preserve configuration-key context when converting owned values and
      enriching validation errors.

    Adapt config-tree conversions for the new owned values and optional-result
    shape, including booleans, integers, paths, URLs, refspecs, timeouts,
    compression levels, and reference names.

    Return owned remote names, default remote names, branch tracking
    references, and submodule paths so these results are independent of the
    repository configuration borrow. Protocol feature values likewise use
    owned strings.

    Update repository opening, initialization, cloning, remotes, filters,
    status, submodules, and related tests to use the lifetime-free APIs.

Other

  • update dirwalk::basics for collapsed empty-directory trees
    some/ (a tree of only empty directories) now collapses to an empty
    directory and is skipped when empty directories aren't emitted, matching
    Git which treats a tree with no files as clean. See #2490.

New Features

  • add tix to the gix CLI
  • add Repository::normalize_path()
    This way, one won't have to use the Pattern + normalize workaround anymore.
  • add discover_opts() as sibling to open_opts().This makes isolated discovery easier, at the cost of less control compared to itsgix::ThreadSafeRepository` counterpart.
  • respect configured zlib compression levels
    Understand and validate core.compression, core.looseCompression and pack.compression, including git's -1 mapping to the zlib default. Apply these settings when writing loose objects and receiving packs.
  • introduce lazy, thread-local evaluation of core.fscache on Windows
  • add Connection::configured_credentials_for_current_url().
    It extracts the URL from the input action, which is relevant in case
    of redirects which changes the initial url.

Chore

  • let archived fixtures bypass Git version gates

    Git-dependent fixture tests currently skip outright when the installed Git is
    incompatible, even when a checked-in archive contains a known-good fixture that
    could run safely. This also keeps 32-bit CI pinned to Debian 12 because Debian
    13 ships affected Git 2.47.x.

    Use the guarded scripted-fixture loaders for minimum-version worktree tests and
    the shared rev-spec fixture, then return 32-bit CI to Debian stable.

    Git 57fb139b5e introduced reversed :/ traversal in 2.47.x; Git 0ff919e87a
    restored youngest-first ordering in 2.48.0.

Bug Fixes

  • avoid treating symbolic remote names as URLs
    --- agent

    Configured remotes without an effective fetch URL exposed their symbolic name
    as a local-path URL.

    Only use a remote name as the missing fetch URL when remote-name classification,
    a non-file transport, or native absolute-path detection identifies it as a URL.

    Git baseline: remote.c:remotes_remote_get_1() adds the explicitly supplied name
    as a URL when the remote has no configured URL; t/t5505-remote.sh covers remote
    get-url behavior. This change intentionally diverges for symbolic names.

  • always treat submodule names as relative.
    Previously it would assume they are relative, join them with
    a base path, which could promptly be overridden by an absolute
    submodule name, which is valid for Git as well.

    Code handling submodule paths is now aware and won't accidentally
    break out of the repository anymore.

  • honor credential.protectProtocol for helper exchanges

  • preserve multiple remote URLs
    Configured remotes can have multiple remote..url or remote..pushUrl
    values, but gix::Remote kept only one value because lookup used the singular
    config accessor. That meant the most recent config value won, while Git exposes
    every effective URL and uses the first one for the singular get-url form.

    Add ordered URL storage to gix::Remote and expose Remote::urls(Direction) for
    all effective URLs. Keep Remote::url(Direction) as the singular compatibility
    API, now returning the first effective URL. Fetch URLs used as push fallbacks
    try pushInsteadOf first and then insteadOf, matching Git behavior.

    The regression fixture records Git 2.50.1 behavior with git remote get-url:
    without --all it prints the first configured URL, and with --all it prints all
    configured URLs in order for both fetch and push.

  • keep core.worktree-derived worktree paths in the caller's path namespace
    Since b1c1cce, relative core.worktree values from repository-owned
    configuration were resolved against the symlink-resolved git dir whenever
    that differed from the logical git dir. That is correct when the .git
    directory itself is reached through a symlink (#2052), but it also fired
    when merely an ancestor directory is a symlink - like /var on macOS,
    where TMPDIR defaults to a path inside the symlinked /var/folders.

    In that case a submodule repository opened through the symlinked path
    would return a canonicalized workdir() while Repository::path() and
    all paths the caller holds remain in the symlinked namespace, breaking
    prefix-based path logic such as
    repo.workdir().strip_prefix(parent_worktree_dir).

    Now the symlink-resolved base is only used when resolving the relative
    worktree path against the logical and the resolved git dir leads to
    different directories on disk. If both denote the same directory, the
    logical path is kept, so all paths of the opened repository remain
    consistent with the path it was opened with.

  • consume open_path_as_is after resolving repository paths

  • Repository::kind() detects linked worktrees of bare repos

  • pass through the allocation limit
    This is particularly important in untrusted repositories, which
    get a reduced allocation limit.

  • gix::open() now handles repo.git directories correctly.
    Previously they were incorrectly assumed to be the actual .git repository
    and treated as such.

  • resolve relative core.worktree from real git dir

Chore (BREAKING)

  • adapt to changes in gix-config
    Marked as breaking explicitly to as we know paramter types were
    changed to use convenience traits.

Commit Statistics

  • 72 commits contributed to the release.
  • 31 days passed between releases.
  • 22 commits were understood as conventional.
  • 4 unique issues were worked on: #1622, #2024, #2052, #2696

Commit Details

view details
  • #1622
    • Let archived fixtures bypass Git version gates (1568b31)
  • #2024
    • Respect configured zlib compression levels (319cec2)
  • #2052
    • Resolve relative core.worktree from real git dir (b1c1cce)
  • #2696
    • Preserve multiple remote URLs (5f244b3)
  • Uncategorized
    • Update changelogs prior to release (cb6ec7d)
    • Release gix-trace v0.1.21, gix-validate v0.11.3, gix-path v0.12.3, gix-utils v0.3.5, gix-config-value v0.19.0, gix-prompt v0.16.0, gix-sec v0.14.2, gix-url v0.37.0, gix-credentials v0.39.0, safety bump 18 crates (f0ec710)
    • Merge pull request #2809 from GitoxideLabs/gix-tix-mvp (443b401)
    • Add tix to the gix CLI (31a94aa)
    • Merge pull request #2737 from GitoxideLabs/encoding-fallback-pony (2315ede)
    • Adapt to changes in gix-filter (552402f)
    • Merge pull request #2735 from GitoxideLabs/better-exclude-handling (02cb162)
    • Add Repository::normalize_path() (6fe97a9)
    • Add discover_opts() as sibling to open_opts().` (2f4c488)
    • Merge pull request #2734 from GitoxideLabs/url-parse-convenience (e7af50e)
    • Adapt to changes in gix-url (271454b)
    • Merge pull request #2732 from GitoxideLabs/testools-use-archive (a3e9a77)
    • Merge pull request #2729 from GitoxideLabs/improvements (9949e9f)
    • Avoid treating symbolic remote names as URLs (4d47453)
    • Merge pull request #2728 from GitoxideLabs/try-bisync (adf4b7a)
    • Replace maybe-async with bisync. (c3f2244)
    • Merge pull request #2725 from GitoxideLabs/gix-config-improvements (5982dfe)
    • Adapt to changes in gix-config (6aa934a)
    • Merge pull request #2721 from GitoxideLabs/remove-kstring (e70732a)
    • Adapt to changes in gix-attributes (e11d7a2)
    • Merge pull request #2722 from GitoxideLabs/reasons (c16b5a1)
    • Replace lint allowances with expectations (43ff87a)
    • Merge pull request #2667 from GitoxideLabs/lifetime-free-config-parser (55b5158)
    • Adapt to lifetime-free configuration files in gix-config (582d7b5)
    • Merge pull request #2718 from GitoxideLabs/submodule-name-reject-absolute (402babd)
    • Always treat submodule names as relative. (53515b6)
    • Merge pull request #2715 from GitoxideLabs/fixup-credentials (299d16b)
    • Adapt the credential command to explicit context options in gix-credentials (f88cf10)
    • Merge pull request #2714 from GitoxideLabs/fix-credentials-parsing (cf3053a)
    • Honor credential.protectProtocol for helper exchanges (d89bda0)
    • Release gix-path v0.12.2, gix-error v0.2.5, gix-utils v0.3.4, gix-date v0.15.6, gix-url v0.36.2, gix-credentials v0.38.2 (27aec47)
    • Merge pull request #2698 from GitoxideLabs/multi-remote-url (7056d62)
    • Add missing SHA256 archive (432e2b1)
    • Merge pull request #2695 from ameyypawar/fix/2024-compression-level (6e1c4a2)
    • Review (f1ac335)
    • Merge pull request #2697 from mtsgrd/fix/keep-worktree-path-namespace (6e5a5de)
    • Review (1cda1d1)
    • Keep core.worktree-derived worktree paths in the caller's path namespace (24293fc)
    • Merge pull request #2710 from GitoxideLabs/fix-reload (d5cd537)
    • Merge pull request #2699 from jason5122/fix-kind-worktree-of-natively-bare-repo (1ff51ca)
    • Consume open_path_as_is after resolving repository paths (8f8d6ab)
    • Review (b36ca4c)
    • Repository::kind() detects linked worktrees of bare repos (54a3c2a)
    • Merge pull request #2707 from ameyypawar/fix/2703-inflate-error (6d95da6)
    • Adapt to changes in gix-features, use gix-zlib accordingly. (9c2977a)
    • Merge pull request #2702 from ameyypawar/fix/2694-exn-source-chain (e9c973d)
    • Thanks clippy (d533f0c)
    • Review (dc1fdc3)
    • Merge pull request #2691 from GitoxideLabs/gix-pack-missing-cap (0052e42)
    • Pass through the allocation limit (0a5c62a)
    • Merge pull request #2547 from special-bread/windows-status-performance (3e43c42)
    • Apply changed by special-bread (54b5393)
    • Merge pull request #2687 from ameyypawar/fix/1832-rename-tracker-order-independent (a82b492)
    • Review (32cb1ad)
    • Introduce lazy, thread-local evaluation of core.fscache on Windows (158f899)
    • Review (f2dfdd8)
    • Use dir-cache for accelerated status calls on Windows (7de7a30)
    • Merge pull request #2686 from GitoxideLabs/try-redirect-re-auth (d8aeaac)
    • Add Connection::configured_credentials_for_current_url(). (a5d4616)
    • Adapt to changes in gix-transport (6a7a717)
    • Merge pull request #2682 from GitoxideLabs/improvements (f77cb0a)
    • gix::open() now handles repo.git directories correctly. (9fe1050)
    • Merge pull request #2673 from ameyypawar/fix/2490-empty-dir-collapse (c31dac2)
    • Review (596ab93)
    • Update dirwalk::basics for collapsed empty-directory trees (7e17fcf)
    • Merge pull request #2671 from GitoxideLabs/fix-worktree-path-resolution (a7625fa)
    • Address auto-review (1e3da34)
    • Merge pull request #2646 from GitoxideLabs/report (1b1541e)