github GitoxideLabs/gitoxide git-hash-v0.9.0
git-hash v0.9.0

2 years ago

New Features

  • Assign version numbers to Kind and implement TryFrom<u8>
    This makes reading and writing the hash number easier for newer file
    formats.
  • add Kind::from_len_in_bytes() const fn
  • Kind::len_in_bytes() method
    It yields the amount of bytes needed to store the hash.

Changed (BREAKING)

  • rename oid::try_from() to try_from_bytes(), add from_bytes_unchecked()
    This change was done in the name of consistency, as from_bytes() is
    used in many other git-* crates

  • Remove Kind:Efrom_len_in_bytes() from public API
    It shouldn't be encouraged to assume the hash can be deduced from its
    length, also git doesn't assume this.

    If that would happen, we would have other problems though, so let's hope
    it doesn't happen nonetheless.

  • Remove ObjectId::null_sha1() from public API
    Use Kind::Sha1.null() instead if it's a value where the actual
    repository object hash doesn't matter.

  • rename Kind::null() to null_ref() and Kind::null_owned() to null()
    This naming is consistent with typical Rust APIs and the naming used
    throughout the git-* crates thus far.

  • remove Kind::new_sha1() from public API

  • Kind::from_len_in_bytes() is infallible

  • remove ObjectId::from_20_bytes() from public API
    Use ObjectId::from() or ObjectId::try_from() instead.

  • remove various SHA1 specific hex utilities in favor of unspecific new ones.

    removed to_sha1_hex(), use oid::hex_to_buf() and oid::hex_to_buf() instead.
    remove ObjectId::write_hex_to() in favor of oid::write_hex_to()

  • oid::null_sha1() replaced with Kind::null()

  • remove ObjectId::from_borrowed_sha1()

  • remove ObjectId::to_sha1_hex_string()
    Use .to_hex().to_string() instead.

  • SIZE_OF_SHA1_DIGEST is now private
    Replace it with your own constant derived from

  • rename Kind::to_hex() to Kind::to_hex_with_len(); add Kind::to_hex()
    The latter prints the oid in full.

Commit Statistics

  • 24 commits contributed to the release over the course of 30 calendar days.
  • 92 days passed between releases.
  • 16 commits where understood as conventional.
  • 3 unique issues were worked on: #279, #287, #293

Thanks Clippy

Clippy helped 1 time to make code idiomatic.

Commit Details

view details
  • #279
    • Basic multi-pack index creation (89428b2)
    • multi-pack index writing complete with large-offset support (f7d5c7f)
    • Assign version numbers to Kind and implement TryFrom<u8> (84e26a7)
    • rename oid::try_from() to try_from_bytes(), add from_bytes_unchecked() (79dc0d5)
    • Remove Kind:Efrom_len_in_bytes() from public API (1b75541)
    • Remove ObjectId::null_sha1() from public API (b12ee8a)
    • rename Kind::null() to null_ref() and Kind::null_owned() to null() (eaf48bd)
    • remove Kind::new_sha1() from public API (60a4eb5)
    • Kind::from_len_in_bytes() is infallible (c079fbe)
    • refactor (7331e99)
    • remove ObjectId::from_20_bytes() from public API (2a799e6)
    • fix docs (cd981e2)
    • remove various SHA1 specific hex utilities in favor of unspecific new ones (53c748d)
    • oid::null_sha1() replaced with Kind::null() (67652cb)
    • remove ObjectId::from_borrowed_sha1() (3363f1e)
    • remove ObjectId::to_sha1_hex_string() (75b901e)
    • SIZE_OF_SHA1_DIGEST is now private (b596fa0)
    • rename Kind::to_hex() to Kind::to_hex_with_len(); add Kind::to_hex() (3373946)
    • add Kind::from_len_in_bytes() const fn (ce673bf)
    • Kind::len_in_bytes() method (9a0d8b8)
  • #287
    • Very rough version of repository verification (80a4a7a)
  • #293
    • prepare changelogs for git-index and dependencies (f54bf4b)
  • Uncategorized
    • Better not have items within items in changelogs (6946125)
    • thanks clippy (d8925f5)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.