Skip to content

gix-diff v0.66.0

Choose a tag to compare

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

Chore

  • add a benchmark for the rewrite tracker specifically.

Bug Fixes

  • prefer file-name matches when pairing rename candidates, like Git
    When several sources are equally viable for a destination - identical ids in the identity pass, or equal similarity in the similarity pass - prefer the one whose file name matches the destination's, in the spirit of Git's basename-driven matching. This makes the now-deterministic choice also the semantically better one, where previously the pairing among identical candidates was arbitrary.

    The tree-merge baseline had recorded the arbitrary pairings in its three deviating cases, along with their consequences. These expectations are updated to the improved outcomes:

    • rename-within-rename-2: both merge directions now produce the same cleanly merged tree - the result that was previously present but commented out in favor of the order-dependent conflict, making the merge reversible as intended. The expected-reversed workaround branch is no longer needed.
    • conflicting-rename-complex (both directions): contents follow their true renames now that files pair up by name, and the previously documented mismatch of finding a rename of a/w to a-renamed/z no longer happens. Forward and reversed merges produce the same tree and mirror-image conflict stages.

    All other 114 baseline cases are unchanged, in SHA-1 and SHA-256. Note that in the identity pass, when no file-name match exists, the scan now covers the whole same-id range before falling back to the first eligible candidate, where it stopped previously.

Other

  • make rename tracking independent of the input order
    The rewrites tracker sorted its items with a same-id tiebreak on the path byte-range offsets, which are assigned in the order changes are pushed. As changes can arrive nondeterministically - the index-worktree status feeds the tracker from a dirwalk thread and an index-traversal thread - the matcher could pick different sources for identical-content candidates between runs.

    Sort by each item's observable identity instead (id, then location, change-kind, relation and entry-mode), a total order that is independent of push order. Items that still compare equal are identical in every observed field and thus interchangeable for matching.

    Adds permutation tests for the rename and exhaustive-copy paths, and updates the realistic_renames_2 snapshot where two same-id entries now emit in path order (a pure reorder).

Commit Statistics

  • 15 commits contributed to the release.
  • 31 days passed between releases.
  • 3 commits were understood as conventional.
  • 1 unique issue was worked on: #1832

Commit Details

view details
  • #1832
    • Prefer file-name matches when pairing rename candidates, like Git (cea5ea7)
    • Make rename tracking independent of the input order (1acc43d)
  • 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 #2737 from GitoxideLabs/encoding-fallback-pony (2315ede)
    • Adapt to changes in gix-filter (552402f)
    • 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 #2687 from ameyypawar/fix/1832-rename-tracker-order-independent (a82b492)
    • Review (32cb1ad)
    • Add a benchmark for the rewrite tracker specifically. (b65c7ef)
    • Use gix_odb::memory::Proxy<gix_object::Never> where applicable (3880993)
    • Merge pull request #2646 from GitoxideLabs/report (1b1541e)