github GitoxideLabs/gitoxide gix-status-v0.37.0
gix-status v0.37.0

7 hours ago

Performance

  • Use safe Rust for the Windows gix-status filesystem cache
    Really just skimmed the unit-tests, but looked carefully at the integration test,
    which was small enough. Overall, much better tests and probably a bugfix as well.

    Replace handwritten Windows directory enumeration with std::fs::read_dir()
    and DirEntry::metadata(). On Windows, entry metadata comes from the directory
    listing without an additional per-entry metadata syscall. This removes unsafe
    FFI, raw-buffer parsing, manual reparse-tag classification, and the crate's
    now-unused windows-sys dependency.

    Keep the compact cached Stat and the existing lazy, per-worker lifetime of
    one status operation. Exact-name misses, unreadable entries, unrepresentable
    filenames, and failed enumerations still use the live metadata path. Missing
    cached entries never become authoritative not-found results. Root validation
    and canonicalisation remain unchanged; this adds no checkout integration or
    cache invalidation.

    Derive file types from standard-library metadata, including file and directory
    symlinks and junctions. Preserve file size and use creation time for index
    ctime. Reuse the index's timestamp conversion so pre-epoch timestamps cause
    a cache miss instead of being silently clamped to the Unix epoch.

    Add isolated Windows fixtures comparing cached and live metadata, including
    nanosecond timestamps, invalid UTF-16 names, links, and junctions. Exercise
    missing entries and failed enumeration after filesystem changes, and compare
    cached and uncached status to verify the live fallback and syscall counts.
    The pre-epoch regression test failed against the original implementation and
    passes with this change.

    Document that enumeration throughput can differ from the previous custom
    64-KiB batching. A release-mode microbenchmark of cache construction and lookups
    used isolated temporary fixtures, warmed runs, and 41 alternating old/new
    samples per layout. Median times in milliseconds were:

    Files Directories Previous Standard library
    10,000 1 13.32 7.16
    10,000 100 114.51 9.93
    1,000 1,000 27.94 31.22

    Repeated measurements confirmed about a 12% slowdown for one-file directories,
    while the denser layouts improved substantially. These are cache microbenchmarks,
    not end-to-end status timings or a guarantee of equivalent performance.

  • avoid unrelated attribute and ignore reads
    Went through the tests quickly, but refactored them for read-only usage.

    Repeated Tix status refreshes spend time opening pattern files that the active
    operation does not need. Tracked content checks previously loaded ignores,
    and untracked directory walks loaded attributes through a combined stack.

    Separate the consumed status cache into an ignore stack for directory walking
    and an attribute stack for content filters, pathspecs, and rewrite detection.
    Reuse the existing lazy Repository::pathspec() setup so ordinary pathspecs
    do not eagerly load attributes or ignores.

    A regression uses unreadable symlink loops to detect unnecessary reads while
    checking that attribute-constrained pathspecs and untracked ignores still work.
    It fails before the change and passes after it. All 31 selected gix status
    tests and all 35 gix-status tests pass.

Bug Fixes

  • match Git's filter path so Git LFS extensions don't show false modifications
    Status passed the absolute worktree path to convert_to_git(), so filters saw
    it as %f or pathname where Git passes the relative path. Filters whose
    output depends on the path then reported phantom modifications, for example Git
    LFS with an extension that uses %f.

Commit Statistics

  • 10 commits contributed to the release over the course of 14 calendar days.
  • 14 days passed between releases.
  • 3 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #3072 from juanibiapina/fix-status-filter-path (86d5fa6)
    • Review (d53efc4)
    • Match Git's filter path so Git LFS extensions don't show false modifications (056ab42)
    • Merge pull request #3071 from GitoxideLabs/safe-fscache (46f7c7d)
    • Use safe Rust for the Windows gix-status filesystem cache (067cf97)
    • Merge pull request #3064 from GitoxideLabs/various-improvements (8c513c5)
    • Avoid unrelated attribute and ignore reads (59b57fa)
    • Merge pull request #3053 from GitoxideLabs/various-improvements (2d8dcc4)
    • Release gix-error v0.5.1, gix-utils v0.5.1 (6d1b686)
    • Merge pull request #3048 from GitoxideLabs/new-release (5fccccf)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.