New Features
entry::Time
can convert from and to system time.- add
State::sort_entries()
andState::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 theREMOVED
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
ashash
in the root of the crate.
This makes it easier to use the crate standalone as plumbing as instantiation
requires access togit_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 ofFrom<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()
andState::dangerously_push_entry()
. (654bd8f) - add
State::entry_mut_by_path_and_stage()
(aa1b6ee) State::write_to()
respects theREMOVED
flag. (3ebe2d4)- expose
git_hash
ashash
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 ofFrom<File> for State
. (3753ad5) - add
File::set_path()
to allow setting the location of an index file on disk. (a7183e2)