github GitoxideLabs/gitoxide gix-odb-v0.84.0
gix-odb v0.84.0

53 minutes ago

Refactor (BREAKING)

  • add object_hash to gix-odb::Store::at_opts() and remove it from options
    This aligns at and at_opts, putting mandatory information as separate parameters.

New Features (BREAKING)

  • require object_hash in Store::at
    Split Store::at_opts for callers that want to pass Options.
  • (re-)introduce at(path, hash_kind)
    This way, a hash must be chosen, so that SHA-1 isn't hardcoded anymore.

Changed (BREAKING)

  • fall back to the raw text when unquoting fails.
    Both callers of gix_quote::ansi_c::undo() turned a failure into an error of
    their own, while Git keeps the raw, still-quoted token as the value:

    • parse_attr_line() in attr.c falls through to its unquoted branch
    • Git's alternates parsing in odb.c spells the unterminated case out in a
      comment of its own

    For attributes this also covers invalid escapes, which were previously a hard
    error for the whole line. Git keeps "\!x" as the pattern, where the backslash
    goes on to escape the ! for the matcher rather than negating the pattern.

    Both fall back before checking for the [attr] macro prefix, as Git does, so a
    line like "[attr]x stays a pattern on either side.

    The Unquote variants are unreachable now and have been removed.

Test

  • use gix_testtools::object_hash in a few tests

  • explicitly pass Sha1 for static fixtures

  • exercise alternates parsing without touching the filesystem.
    The previous test reached content() through alternate::resolve(), which meant
    creating a directory whose name begins with the quote that is never closed. That
    is not a legal filename on Windows, where it failed with InvalidFilename.

    Calling content() directly tests the same parsing without a filesystem, and
    adds a companion case showing that intact quoting still decodes its escapes.

New Features

  • expose alternate-file parsing via alternate::parse()
    This is mostly for completeness and more low-level access.

Bug Fixes

  • detect alternate cycles hidden by root siblings.

    Alternate directories were marked as seen when all siblings were queued.
    If a root listed both A and B while A and B pointed at each other, their
    first-discovery parents were both the root. Duplicate checks then found neither
    directory in the other sibling ancestry and missed the real back-edge.

    Process candidate edges depth-first before later siblings, matching Git’s
    recursive alternate ODB traversal. A duplicate is now checked against the
    ancestry of the traversal that reached it, so back-edges produce Error::Cycle
    while shared nodes in a diamond remain harmless deduplicated entries. Add a
    regression test for the root/A/B case.

  • don't treat a shared alternate object directory as a cycle.

Bug Fixes (BREAKING)

  • remove gix_odb::at()

Commit Statistics

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

Commit Details

view details
  • Uncategorized
    • Update manifests prior to release (ebe9095)
    • Merge pull request #2905 from GitoxideLabs/various-improvements (f3bbfad)
    • Adapt to changes in gix-object (object signing) (723d3de)
    • Adapt to changes in gix-testtools (0cbe539)
    • Merge pull request #2916 from cruessler/require-object-hash-in-store-at (dd8c759)
    • Add object_hash to gix-odb::Store::at_opts() and remove it from options (03489c4)
    • Require object_hash in Store::at (b49574c)
    • Merge pull request #2907 from cruessler/pass-object-hash-explicitly (2e929a3)
    • Review (1f54d86)
    • Use gix_testtools::object_hash in a few tests (1452553)
    • Explicitly pass Sha1 for static fixtures (ff65d3c)
    • Merge pull request #2901 from cruessler/switch-to-gix-odb-at-opts (2a4d996)
    • Introduce Store::at() where possible (17fea2a)
    • (re-)introduce at(path, hash_kind) (2eadb31)
    • Remove gix_odb::at() (9fd3ba4)
    • Merge pull request #2891 from ameyypawar/quote-unterminated (6fc3e04)
    • Expose alternate-file parsing via alternate::parse() (ea1d0e2)
    • Review (76f9643)
    • Exercise alternates parsing without touching the filesystem. (b7a71ab)
    • Fall back to the raw text when unquoting fails. (253edde)
    • Merge pull request #2876 from cruessler/branch-10 (04811ec)
    • Fix typos (bde91ae)
    • Merge pull request #2872 from shuvamk/fix/odb-alternates-diamond (0d67a87)
    • Detect alternate cycles hidden by root siblings. (0a50ddd)
    • Don't treat a shared alternate object directory as a cycle. (2193ff1)
    • Merge pull request #2867 from GitoxideLabs/fix-url-authority-parsing (cc3ee80)
    • Release gix-path v0.12.4, gix-command v0.9.2, gix-config-value v0.19.1, gix-url v0.37.1, gix-credentials v0.39.1, gix-transport v0.58.1 (ab4fcb0)
    • Merge pull request #2812 from GitoxideLabs/report-july (ae8845a)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.