github GitoxideLabs/gitoxide git-index-v0.12.0
git-index v0.12.0

22 months ago

New Features

  • entry::Time can convert from and to system time.
  • add State::sort_entries() and State::dangerously_push_entry().
    Both methods work in tandem as one breaks invariants, but allows to quickly
    add entries, while the other restores them.
  • add State::entry_mut_by_path_and_stage()
  • State::write_to() respects the REMOVED flag.
    That way, one can mark entries for removal and these will be pruned
    at write time. This is preferable over performing removals expensively
    in memory.
  • expose git_hash as hash in the root of the crate.
    This makes it easier to use the crate standalone as plumbing as instantiation
    requires access to git_hash.
  • add File::at_or_default(...) to easily open or create an empty in-memory index.
    This is a common operation in new repositories.
  • add State::new() to create a new empty in-memory index.
  • add File::set_path() to allow setting the location of an index file on disk.
    This is useful to change the location of an index after reading it (from another
    location, similar to copy-on-write).

Changed (BREAKING)

  • remove File::into_state() in favor of From<File> for State.
    That way it's less discoverable, but more idiomatic, and we don't want to
    get into the habit of providing multiple names of the exact same
    functionality.

Commit Statistics

  • 11 commits contributed to the release.
  • 7 days passed between releases.
  • 9 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • prepare changelogs prior to release (d679f5b)
    • Merge branch 'various-improvements' (9eee8fe)
    • entry::Time can convert from and to system time. (1e3341a)
    • add State::sort_entries() and State::dangerously_push_entry(). (654bd8f)
    • add State::entry_mut_by_path_and_stage() (aa1b6ee)
    • State::write_to() respects the REMOVED flag. (3ebe2d4)
    • expose git_hash as hash in the root of the crate. (ec36586)
    • add File::at_or_default(...) to easily open or create an empty in-memory index. (5cc3a15)
    • add State::new() to create a new empty in-memory index. (0b40951)
    • remove File::into_state() in favor of From<File> for State. (3753ad5)
    • add File::set_path() to allow setting the location of an index file on disk. (a7183e2)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.