github GitoxideLabs/gitoxide gix-worktree-state-v0.33.0
gix-worktree-state v0.33.0

3 hours ago

Bug Fixes

  • Use the Delegate for Windows terminal symlink checks

    Route non-forced incremental terminal validation through the component-caching
    worktree Delegate on Windows. Keep forced preflight removal late and
    Windows-only.

    Unix continues to rely on O_NOFOLLOW and only inspects paths after collisions,
    avoiding added successful-path I/O.

  • reject terminal symlinks during checkout

    GHSA-pmm9-4h7q-24c8 reports that non-exclusive checkout could open an existing
    terminal symlink while materializing a regular file on Windows. The checkout
    path relied on Unix-only no-follow open flags and did not enforce the same
    invariant on Windows.

    Inspect terminal entries with symlink_metadata immediately before each write or
    create operation. Normal checkout now reports a collision, while forced checkout
    removes the link itself after replacement content is ready.

    Git baseline at a23bace963d5 uses lstat-based terminal checks in entry.c before
    unlinking and exclusively creating checkout output. Related hardening includes
    b6986d8, fab78a0, and 6fa50cc4a19.

  • continue checkout with unavailable encodings
    Repositories can declare working-tree encodings unsupported by encoding_rs, such as UTF-32. Checkout previously rejected these declarations before writing any content, causing non-bare clones to fail.

    Add regression coverage for an unknown encoding with CRLF conversion. Checkout now warns and preserves the output of earlier conversions when the requested encoding is unavailable, while other filter users remain strict by default.

    This matches Git convert.c encode_to_worktree() and entry.c checkout_entry_ca(): since 107642f (Git 2.18), failed checkout re-encoding is non-fatal and the current blob content is written.

    Validated with focused gix-filter conversion tests, gix-worktree-state checkout tests, cargo fmt, and cargo check for gix and gix-worktree-state.

  • remove obsolete executable bits in nonexclusive checkouts
    --- agent

    Nonexclusive checkout reused regular files and only represented a pending
    executable-mode update as a boolean for adding +x. A tracked non-executable
    file therefore retained executable bits from the existing worktree file.

    Add a regression that inverts the modes of existing executable and
    non-executable files for both overwrite_existing settings. Replace the
    one-way boolean with an internal set/remove/unchanged action, and adjust
    mode bits when needed through the already-open file descriptor before
    recording stat data
    Special bits are cleared whenever executable bits are adjusted.

    Git baseline: entry.c creates checkout files using the cache-entry mode, and
    git checkout --force does not retain obsolete executable permissions.

Bug Fixes (BREAKING)

  • preserve executable bits with delayed filters
    --- agent

    Delayed process-filter results recorded a false needs-executable-bit value
    and later passed it as the filesystem capability. Exclusive checkout therefore
    created filtered executable files without +x, while nonexclusive checkout
    also skipped removing obsolete +x from filtered non-executable files.

    Carry the actual filesystem executable-bit capability through delayed
    processing and let the normal open/finalize path derive the required mode
    action from the index entry. Extend the delayed-filter fixture and cover both
    exclusive +x application and nonexclusive +x removal.

    Git baseline: entry.c creates delayed checkout output using the cache entry
    mode when finish_delayed_checkout() retries checkout_entry().

Commit Statistics

  • 16 commits contributed to the release.
  • 31 days passed between releases.
  • 5 commits were understood as conventional.
  • 3 unique issues were worked on: #1783, #1784, #1798

Commit Details

view details
  • #1783
    • Preserve executable bits with delayed filters (c6b803b)
  • #1784
    • Remove obsolete executable bits in nonexclusive checkouts (94f116d)
  • #1798
    • Continue checkout with unavailable encodings (4bc6596)
  • 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 #2811 from GitoxideLabs/no-symlink-follow-on-checkout (c4808f9)
    • Use the Delegate for Windows terminal symlink checks (ca4f65d)
    • Reject terminal symlinks during checkout (b560887)
    • Merge pull request #2737 from GitoxideLabs/encoding-fallback-pony (2315ede)
    • Adapt to changes in gix-filter (552402f)
    • Merge pull request #2730 from GitoxideLabs/delayed-filters-exec-bit (b4f7d9f)
    • Merge pull request #2722 from GitoxideLabs/reasons (c16b5a1)
    • Replace lint allowances with expectations (43ff87a)
    • Merge pull request #2714 from GitoxideLabs/fix-credentials-parsing (cf3053a)
    • 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 #2646 from GitoxideLabs/report (1b1541e)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.