github GitoxideLabs/gitoxide gix-path-v0.14.0
gix-path v0.14.0

5 hours ago

Bug Fixes

  • discover UCRT64 Git for Windows installations

    Git for Windows 2.56 moved its x86_64 executables from mingw64/bin to
    ucrt64/bin. Without Git on PATH, the fallback search missed these
    installations in both global and per-user program directories. The
    EXEPATH shortcut also ignored ucrt64, incorrectly treating a legacy
    prefix as unambiguous when both directories existed.

    Search ucrt64 before mingw64, retaining the existing preference for
    native ARM64 and support for 32-bit installations. Recognize UCRT64 in
    EXEPATH, but continue querying Git when multiple prefixes make that
    shortcut ambiguous. Put UCRT64 before MinGW in the auxiliary prefix
    allowlist too. Extend the candidate-order and filesystem regression tests.

    The repository audit found that gix-testtools already delegates Git
    discovery to gix-path and locates Bash relative to git --exec-path.
    Other legacy paths are historical documentation or credential-quoting test
    data. No independent test-helper discovery fix is needed.

    The reference in ../git is v2.56.0.windows.1 at
    49d759b698127791a5f3f2759c69b983846711dd. Its
    contrib/buildsystems/CMakeLists.txt selects ucrt64 for x64, and
    compat/mingw.c constructs runtime paths using MINGW_PREFIX.

  • resolve Windows drive-relative paths in realpath()

    Paths such as C:repo previously replaced the supplied base with the C:
    prefix and could remain relative. Resolve them against cwd when its drive
    matches, including verbatim drive prefixes, and otherwise ask Windows for the
    current directory on that drive.

    Resolve only the drive prefix so subsequent symlinks are followed before
    interpreting ... Document the base-directory rules and add regressions for
    bare drives, matching and different drives, verbatim bases, fully qualified
    paths, and symlink-sensitive parent traversal.

Bug Fixes (BREAKING)

  • return path conversion errors instead of panicking

    Also brought TestResult in there for nicer error messages, presumably,
    and if anything then at least it's now consistent.

    Git paths can contain arbitrary bytes on Unix, while native Windows paths
    can contain unpaired surrogates that cannot be represented as UTF-8. The
    canonical conversion functions previously hid these failures behind
    panicking wrappers, even when their callers already returned errors.

    Make into_bstr, from_bstr, from_bstring, from_byte_slice, and
    to_native_path_on_windows fallible and remove their redundant try_*
    counterparts. Keep borrowed inputs borrowed and owned inputs owned, and
    retain the concrete encoding error as a source. Also return an error from
    normalize_saturating when normalization exhausts a relative or empty CWD.

    Adapt the workspace in the same breaking change, including public APIs
    for reference and reflog paths, worktree IDs, configuration, pathspecs,
    pattern sources, and command preparation. Convert Prepare to Command
    with TryFrom; inspect ASCII shell syntax through native encoded bytes
    and preserve native commands without a Git-path round trip. Keep reference
    names as bytes in missing-reference diagnostics.

    Propagate conversion failures before affected command execution, filter
    exchanges, and watcher updates. Debug logging records failed diagnostic
    conversions without changing pathspec behavior. Add regression coverage
    for arbitrary Unix bytes, Windows encoding failures, ownership, lazy
    configuration selection, and dependent operations.

Commit Statistics

  • 12 commits contributed to the release over the course of 13 calendar days.
  • 13 days passed between releases.
  • 3 commits were understood as conventional.
  • 1 unique issue was worked on: #3030

Commit Details

view details
  • #3030
    • Discover UCRT64 Git for Windows installations (bf0c259)
  • Uncategorized
    • Prepare changelogs prior to release (794eeef)
    • Merge pull request #3032 from GitoxideLabs/sec-audit (1d7bac7)
    • Return path conversion errors instead of panicking (029c597)
    • Merge pull request #3046 from GitoxideLabs/gix-error-optional-bstr (9272d45)
    • Merge pull request #3033 from GitoxideLabs/gix-cli-progress-cleanup (80f4b03)
    • Merge pull request #3022 from GitoxideLabs/release-testtools (f819565)
    • Merge pull request #3031 from GitoxideLabs/ucrt64 (8738598)
    • Address review comment about Windows runtime prefixes (d3e5cbc)
    • Merge pull request #2977 from GitoxideLabs/worktree-create (d9f7c85)
    • Resolve Windows drive-relative paths in realpath() (25c0078)
    • Merge pull request #3020 from GitoxideLabs/report-september (5fb3dcf)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.