github Byron/gitoxide git-ref-v0.10.0
git-ref v0.10.0

2 years ago

With this release, file::Store is easier to use due to thread-safe handling of an internal and shared
packed-buffer instance. An API for passing it as parameter like before is still present, allowing to use
a 'frozen' version of the packed buffer for any amount of operations.

New Features

  • Add file::Store::iter_(prefixed_)packed().

    These methods allow using an own packed buffer, usually obtained through
    cached_packed_buffer().

  • add file::Store::cached_packed_buffer() for packed refs snapshots

  • add file::Store::try_find_packed(…, packed_buffer)
    That way, abstractions can still be built that have other ways of
    managing the packed-refs buffer, allowing it to stay more persistent.

Changed (BREAKING)

  • rename file::Store::packed_buffer() to …::open_packed_buffer()
    This makes much clearer what it actually does, as previously it might
    have been a stored packed buffer as well.

  • file::Store::from(PathBuf) removed
    At this low level, it's important to be clear about RefLogs and rather
    force the caller to specify the ref-log mode. Technically it depends
    on a few factors, git-repository deals with them, but certainly
    shouldn't default to anything without being clear.

  • Reference log line access
    Reference::log_iter(…) now is a platform instead of a forward iterator,
    which requires a call to .all() to return the forward iterator like
    previously.

    Reference::log_iter_rev(…) was removed in favor of
    Reference::log_iter(…).rev().

  • file::Store::iter() is now a platform, with .all() and .prefixed(…) respectively
    This way, it's possible to keep shared ownership of the packed buffer
    while allowing the exact same iterator machinery to work as before.

  • file::ReferenceExt::follow(…) now without packed refs parameter

  • file::ReferenceExt::peel_to_id_in_place(…) now without packed-refs buffer
    It is instead read from the internally synchronized buffer, shared
    across all instances.

  • file::Store::(try_)find(…, packed) was removed
    The packed buffer is now handled internally while loading it on demand.
    When compiled with git-features/parallel the file::Store remains
    send and sync.

    The packed refs buffer is shared across clones and it's recommended
    to clone one file::Store instance per thread, each of which can
    use its own namespace.

  • move git_ref::file::WriteRefLog to git_ref::store::WriteRefLog

other (BREAKING)

  • Reference::logs() -> Reference::log_iter()
    The latter now returns a standard Platform to iterate over all
    reflog entries from oldest to newest or vice versa.

refactor (BREAKING)

  • file::Store::base is now file::Store::base() and read-only
    That way, file databases can't be repositioned anymore, it's recommended
    to recreate it if that's desired.

Commit Statistics

  • 34 commits contributed to the release over the course of 11 calendar days.
  • 13 commits where understood as conventional.
  • 2 unique issues were worked on: #259, #263

Thanks Clippy

Clippy helped 1 time to make code idiomatic.

Commit Details

view details
  • #259
    • btree/hashmap free lookup of packs in store, keeping things more bundled (a88981b)
  • #263
    • Add file::Store::iter_(prefixed_)packed() (6a17416)
    • add file::Store::cached_packed_buffer() for packed refs snapshots (9eb3a31)
    • rename file::Store::packed_buffer() to …::open_packed_buffer() (b431fb0)
    • add file::Store::try_find_packed(…, packed_buffer) (b030884)
    • file::Store::from(PathBuf) removed (80f3d50)
    • Put general Store on hold - ref-table is needed to know how to go about it (bfa417b)
    • Don't even think about setting up test duplication for the general store (72a6464)
    • Reference::logs() -> Reference::log_iter() (951c050)
    • Reference log line access (bfb32ae)
    • Add platform for log iteration to hold byte buffers (1cd2362)
    • Assure the packed buffer is reloaded after a modification (f5570ff)
    • fmt (fbeddeb)
    • file::Store::iter() is now a platform, with .all() and .prefixed(…) respectively (5d498a3)
    • refactor (5fc3817)
    • refactor packed buffer sharing to allow for sharing snapshots (00c2545)
    • Let file transactions reuse the cached packed buffer (a9096b9)
    • file::ReferenceExt::follow(…) now without packed refs parameter (4641499)
    • file::ReferenceExt::peel_to_id_in_place(…) now without packed-refs buffer (55940eb)
    • file::Store::(try_)find(…, packed) was removed (15d429b)
    • Load packed buffer with interior mutability (ae2eef1)
    • Make it possible to return read guards with packed buffers (f5c3c8f)
    • file::Store::base is now file::Store::base() and read-only (0e18753)
    • refactor, realize why having a packed-buffer with the loose db is valuable (a76f041)
    • A mad attempt to use thread-local everywhere and avoid Sync… (0af5077)
    • Try implementing find_reference to realize that this extra abstraction is overkill (82ea1b8)
    • Look into iteration, but realize that it's harder than finding refs (fc753a8)
    • Sketch of State is seen in store handle and store itself (f87f852)
    • sketch a store handle (fc6480b)
    • move git_ref::file::WriteRefLog to git_ref::store::WriteRefLog (9524732)
  • Uncategorized
    • Release git-features v0.18.0, git-actor v0.7.0, git-config v0.1.9, git-object v0.16.0, git-diff v0.12.0, git-traverse v0.11.0, git-pack v0.15.0, git-odb v0.25.0, git-packetline v0.12.2, git-transport v0.14.0, git-protocol v0.13.0, git-ref v0.10.0, git-repository v0.13.0, cargo-smart-release v0.7.0, safety bump 12 crates (acd3737)
    • Adjust changelogs prior to release (ec38950)
    • thanks clippy (a74f27c)
    • Merge branch 'git-loose-objects' of https://github.com/xmo-odoo/gitoxide into xmo-odoo-git-loose-objects (ee737cd)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.