Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.7.0 (2022-08-24)
Chore
- uniformize deny attributes
New Features
-
File::set_raw_value_filter()to set values only in sections passing a filter. -
File::section_mut_or_create_new_filter()to allow chosing which sections to add values to. -
File::section_mut_or_create_new(…)to obtain an existing or new section for mutation. - use docsrs feature in code to show what is feature-gated automatically on docs.rs
- pass --cfg docsrs when compiling for https://docs.rs
Bug Fixes
- Properly handle boolean values such that
ais true buta=is false. This is even consistent when no booleans are used, such thatahas no value as if it is not present, it's only available for booleans which must be specified. - Keep track of a severe limitation and prepare tests for fixing it.
This also changes behaviour, but merely removes a hack in
Booleanwhich considered empty strings true, even though they are supposed to be false.
Changed (BREAKING)
- Add
File::set_raw_value()to unconditionally set single values, and make the value itself easier to provide.
New Features (BREAKING)
-
file::SectionMut::push()now supports values without key-value separator. These make a difference as those without=are considered boolean true. Currently pushing onto a section is the only way to write them.
Other (BREAKING)
-
File::set_raw_[multi_]value()to::set_existing_raw_[multi_]value. This makes clear that the method will fail if the value doesn't yet exist.
Commit Statistics
- 19 commits contributed to the release over the course of 3 calendar days.
- 6 days passed between releases.
- 11 commits where understood as conventional.
- 1 unique issue was worked on: #450
Thanks Clippy
Clippy helped 1 time to make code idiomatic.
Commit Details
view details
- #450
- Properly handle boolean values such that
ais true buta=is false. (08c50a4) - fix config tests on windows (
7a871c2) - Keep track of a severe limitation and prepare tests for fixing it. (
7c58516) file::SectionMut::push()now supports values without key-value separator. (b6cd6ac)- refactor (
5415449) File::set_raw_value_filter()to set values only in sections passing a filter. (9937d0e)File::section_mut_or_create_new_filter()to allow chosing which sections to add values to. (17455c9)- Add
File::set_raw_value()to unconditionally set single values, and make the value itself easier to provide. (2b2357e) File::section_mut_or_create_new(…)to obtain an existing or new section for mutation. (5902f54)File::set_raw_[multi_]value()to::set_existing_raw_[multi_]value. (69ec594)
- Properly handle boolean values such that
- Uncategorized
- Release git-path v0.4.1 (
5e82346) - Merge branch 'example-write-blob' (
afedd7f) - Merge pull request #494 from ultrasaurus/patch-1 (
86fe22c) - thanks clippy (
2770431) - Merge branch 'main' into remote-ls-refs (
95f2f4f) - Merge branch 'example-new-repo' (
946dd3a) - use docsrs feature in code to show what is feature-gated automatically on docs.rs (
b1c40b0) - uniformize deny attributes (
f7f136d) - pass --cfg docsrs when compiling for https://docs.rs (
5176771)
- Release git-path v0.4.1 (
0.6.1 (2022-08-17)
A maintenance release without user facing changes.
Commit Statistics
- 10 commits contributed to the release over the course of 26 calendar days.
- 26 days passed between releases.
- 0 commits where understood as conventional.
- 1 unique issue was worked on: #482
Thanks Clippy
Clippy helped 1 time to make code idiomatic.
Commit Details
view details
- #482
- refactor (
1ee9918)
- refactor (
- Uncategorized
- Release git-date v0.0.3, git-actor v0.11.1, git-attributes v0.3.1, git-tempfile v2.0.3, git-object v0.20.1, git-ref v0.15.1, git-config v0.6.1, git-diff v0.17.1, git-discover v0.4.0, git-bitmap v0.1.1, git-index v0.4.1, git-mailmap v0.3.1, git-traverse v0.16.1, git-pack v0.21.1, git-odb v0.31.1, git-packetline v0.12.6, git-url v0.7.1, git-transport v0.19.1, git-protocol v0.18.1, git-revision v0.4.0, git-worktree v0.4.1, git-repository v0.21.0, safety bump 5 crates (
c96473d) - prepare changelogs prior to reelase (
c06ae1c) - Release git-hash v0.9.7, git-features v0.22.1 (
232784a) - Merge branch 'format_git_date_time' (
99e12be) - thanks clippy (
4bd747c) - commit strange changes to be able to do anything. (
237b21d) - commit strange crlf-file that makes everything impossible (
1dd9f9a) - make fmt (
47724c0) - Fix typos (
e9fcb70)
- Release git-date v0.0.3, git-actor v0.11.1, git-attributes v0.3.1, git-tempfile v2.0.3, git-object v0.20.1, git-ref v0.15.1, git-config v0.6.1, git-diff v0.17.1, git-discover v0.4.0, git-bitmap v0.1.1, git-index v0.4.1, git-mailmap v0.3.1, git-traverse v0.16.1, git-pack v0.21.1, git-odb v0.31.1, git-packetline v0.12.6, git-url v0.7.1, git-transport v0.19.1, git-protocol v0.18.1, git-revision v0.4.0, git-worktree v0.4.1, git-repository v0.21.0, safety bump 5 crates (
0.6.0 (2022-07-22)
New Features
-
following includes is now non-fatal by default Otherwise it would be relatively easy to fail gitoxide startup, and we want to be closer to the behaviour in git which ignores most of the errors.
-
File::from_git_dir()as comfortable way to instantiate most complete git configuration. -
Filenow compares actual content, ignoring whitespace and comments. -
File::new_environment_overrides()to easily instantiate overrides from the environment. -
File::new_globals()can instantiate non-local configuration with zero-configuration. -
Source::storage_location()to know where files should be located. -
file::ValueMut::(section|into_section_mut)()to go from value to the owning section. This can be useful if the value was obtained usingraw_value_mut(). -
Source::is_in_repository()to find out if a source is in the repository. -
parse::keyto parse aremote.origin.url-like key to identify a value -
Add
File::detect_newline_style(), which does at it says. -
File::frontmatter()andFile::sections_and_postmatter(). -
parse::Event::to_bstr_lossy()to get a glimpse at event content. -
File::append()can append one file to another rather losslessly. The loss happens as we, maybe for the wrong reasons, automatically insert newlines where needed which can only be done while we still know the file boundaries. -
file::Section::meta()to access a section's metadata. -
File::sections()to obtain an iterator over all sections, in order. -
place spaces around
key = valuepairs, or whatever is used in the source configuration. -
proper escaping of value bytes to allow round-tripping after mutation
-
whitespace in newly pushed keys is derived from first section value. That way, newly added key-value pairs look like they should assuming all keys have the same indentation as the first key in the section.
If there is no key, then the default whitespace will be double-tabs like what's commmon in git.
-
File::from_str()implementation, to supportlet config: File = "[core]".parse()? -
whitespace in mutable sections can be finely controlled, and is derived from existing sections
-
parse::Header::new(…)with sub-section name validation -
Add
parse::(Event|section::Header|Comment)::write_to(…). Now it's possible to serialize these types in a streaming fashion and without arbitrarily enforcing UTF-8 on it -
serde1feature to add limited serde support
Bug Fixes
-
maintain insertion order of includes on per-section basis at least. Note that git inserts values right after the include directive, 'splitting' the section, but we don't do that and insert new values after the section. Probably no issue in practice while keeping our implementation simple.
-
maintain newline format depending on what's present or use platform default. Previously implicit newlines when adding new sections or keys to sections was always
\nwhich isn't correct on windows.Now the newline style is detected and used according to what's present, or in the lack of content, defaults to what's correct for the platform.
-
validate incoming conifguration keys when interpreting envirnoment variables.
-
Booleancan use numbers to indicate true or false, drops support foroneandzero. -
file::MutableSection::remove()now actually removes keys and values. -
file::MutableMultiValueescapes input values and maintains key separator specific whitespace. -
value normalization (via
value::normalize()handles escape sequences. The latter ones are\n,\tand\bwhich are the only supported ones in values of git-config files. -
stable sort order for
File::sections_by_name_with_header() -
count newlines (for error display) in multi-line values as well
-
auto-normalize string values to support quote removal in case of strings. Related to https://github.com/starship/starship/pull/3883 .
Other
- :Events::from_bytes()
withfilter` support.
Changed (BREAKING)
-
add
File::resolve_includes()and move its error type tofile::includes. -
add
File::from_bytes_owned()and removeFile::from_path_with_buf() -
remove
File::from_env_paths(). It's replaced by its more comfortablenew_globals(). -
untangle
file::init::…OptionandErrortypes. This moves types to where they belong which is more specific instead of having a catch-allErrorandOptionstype. -
rename
parse::Comment::(comment_tag|comment)to::tag|textandparse::Section::section_headerto::header. -
Associate
file::Metadatawith eachFile. This is the first step towards knowing more about the source of each value to filter them based on some properties.This breaks various methods handling the instantiation of configuration files as
file::Metadatatypically has to be provided by the caller now or be associated with each path to read configuration from. -
rename
file::SectionBodytofile::section::Body. -
Remove
File::sections_by_name_with_header()as::sections_by_name()now returns entire sections. -
create
resolve_includesoptions to make space for more options when loading paths. -
rename
path::Optionsintopath::Context. It's not an option if it's required context to perform a certain operation. -
All accessors in
Fileare now usingimpl AsRef<str>where possible for added comfort. -
Much more comfortable API
file::*Muttypes thanks toimpl Into/AsRef. -
Rename
Mutable*into$1Mutfor consistency. -
conform APIs of
file::MutableValueandfile::MutableMultiValue. There are more renames and removals than worth mentioning here given the current adoption of the crate. -
rename
file::MutableSection::set_leading_space()toset_leading_whitespace(). The corresponding getter was renamed as well toleading_whitespace(). -
Enforce
parse::section::Header::new()by making its fields private. -
Add
File::write_to()andFile::to_bstring(); remove someTryFromimpls. NowFilecan be serialized in a streaming fashion and without the possibility for UTF8 conversion issues.Note that
Displayis still imlpemented with the usual caveats. -
remove
Integer::to_bstring()as well as someTryFromimpls. Note that it can still display itself like before viastd::fmt::Display. -
remove
Boolean::to_bstring()along with a fewFromimpls. These were superfluous and aren't useful in practice. Note that serialization is still implemented viaDisplay. -
allocation free
File::sections_by_name()andFile::sections_by_name_with_header(). -
Path::interpolate()now takespath::interpolate::Optionsinstead of three parameters. -
remove
Stringtype in favor of referring to theFile::string()method. The wrapper had no effect whatsoever except for adding complexity. -
Simplify
Booleanto be a wrapper aroundbool. Previously it tried hard not to degenerate information, making it a complicated type.However, in practice nobody cares about the exact makeup of the boolean, and there is no need to serialize a boolean faithfully either.
Instead, those who want to set a value just set any value as a string, no need for type safety there, and we take care of escaping values properly on write.
-
Use bitflags for
color::Attributeinstead ofVecof enums. This is less wasteful and sufficient for git, so it should be sufficient for us, especially since attributes are indeed a set and declaring one twice has no effect. -
simplify
ColorAPI. For now we only parse and serialize for display, but more uses are enabled when needed and trivially. -
remove
parse::Events::from_pathandFile::atThe latter has been replaced withFile::from_path_with_buf(…)and is a low-level way to load just a single config file, purposefully uncomfortable as it will not resolve includes.The initialization API will need some time to stabilize.
-
Slim down API surface of
parse::Events. It's more of a 'dumb' structure now than before, merely present to facilitate typical parsing than something special on its own. -
remove
File::new()method in favor ofFile::default(). -
rename
parse::event::Listtoparse::Events -
rename
parse::Statetoparse::event::List -
move
value::*into the crate root, except forErrorandnormalize_*(). -
rename
value::parse::Errortovalue::Error. -
rename
value::TrueVarianttovalue::boolean::True -
rename
IntegerSuffixtointeger::Suffix -
rename
value::Color(Attribute|Value)tovalue::color::Attributeandvalue::color::Name. -
Turn
parse::ParseOrIoErrorintoparse::state::from_path::Error -
rename
parse::ParsedCommentintoparse::Comment -
rename
parse::Section*related types. These are now located insection::*. -
rename
parse::Parsertoparse::State. Furthermore, makeStatethe entry point for all parsing, removing all free-standing functions that returned aState. -
rename
parsermodule toparse -
rename
normalize_cow()tonormalize()and move allnormalize*functions fromvaluesto thevaluemodule -
move
Pathfromvaluestovaluemodule -
Move
BooleanandStringfromvaluesintovaluemodule -
move
values::Integerintovaluemodule -
move
Colorto ownvaluemodule -
remove
values::Bytes- usevalues::Stringinstead. Note that these values are always normalized and it's only possible to get a raw values using theraw_value()API.
New Features (BREAKING)
-
Support for
lossyload mode. There is a lot of breaking changes asfile::from_paths::Optionsnow becamefile::init::Options, and the same goes for the error type. -
add
_filter()versions to most access methods. That way it's possible to filter values by their origin.Note that the
remove_section()methods now return the entire removed section, not just the body, which yields more information than before including section metadata. -
section names are now validated.
-
filtering supportort for
parse::Events. That way it's possible to construct Files which are not destined to be written back as they only keep events necessary for value access, greatly reducing allocations. -
change mostily internal uses of [u8] to BString/BStr
-
Path-interpolation makes
home-dirconfigurable. That way the caller has full control over how the environment is used, which also allows more fine-grained control over which config files can be included.
Bug Fixes (BREAKING)
-
Simplify specifying keys when mutating config values.
-
File::rename_section()with validation of input arguments. -
improve normalization; assure no extra copies are made on query. We now return our own content, rather than the originals with their lifetimes, meaning we bind lifetimes of returned values to our own
Fileinstance. This allows them to be referenced more often, and smarter normalization assures we don't copy in the simple cases either.More tests were added as well. This is breaking as lifetime changes can cause distruptions, and
values?_as()was removed as well as it's somewhat duplicate to higher-level APIs and it wasn't tested at all. -
Remove
git-configtest utilities fromgit-path.
Other (BREAKING)
-
File::raw_multi_value()toFile::raw_values() -
File::raw_multi_value_mut()toFile::raw_values_mut() -
File::multi_value()toFile::values(). The latter is better in line withstring()/strings()
Commit Statistics
- 316 commits contributed to the release over the course of 33 calendar days.
- 39 days passed between releases.
- 93 commits where understood as conventional.
- 1 unique issue was worked on: #331
Thanks Clippy
Clippy helped 19 times to make code idiomatic.
Commit Details
view details
- #331
- final documentation review + adjustments prior to release candidate (
06b86e0) - refactor (
4dc6594) - exclude particular assertion which fails on the linux CI. (
5e0f889) - first sketch of using configuration and environment variables for author/committer (
330d0a1) - remove
Permissionsas there is no need for that here. (1954ef0) - following includes is now non-fatal by default (
1bc96bf) - Allow to skip non-existing input paths without error (
989603e) File::from_git_dir()as comfortable way to instantiate most complete git configuration. (f9ce1b5)- Add a way to load multiple configuration files without allocating a read buffer (
acb4520) - refactor (
ec21e95) - move
Envtest utility intogit-testtools(bd3f4d0) - refactor (
b073e29) - another failing tests that can't be fixed without a refactor (
e4d8fd7) - an attempt to hack newline handling into place for windows newlines (
dac1463) - Serialize lossily-read configuration files correctly anyway. (
cfda0c3) - multi-path include test (
3d89a46) - refactor (
8a7fb15) - fix windows tests (
fbcf40e) - finally proper whitespace handling in all the right places for perfect roundtripping to/from string (
97e5ede) - serializations maintains some invariants about whitespace where possible. (
ee10dd5) - refactor (
9c248ee) Filenow compares actual content, ignoring whitespace and comments. (14a68a6)- maintain insertion order of includes on per-section basis at least. (
6c1588f) - allow insertion of sections while preserving order (
f5580a3) - a test showing that include ordering isn't correct compared to the including config. (
4e47df5) - add
File::resolve_includes()and move its error type tofile::includes. (17c83d5) - add
File::from_bytes_owned()and removeFile::from_path_with_buf()(5221676) - make it necessary to deal with the possibility of no-input in
from_paths_metadata(). (612645f) - Don't fail on empty input on the comfort level (
61ecaca) File::new_environment_overrides()to easily instantiate overrides from the environment. (7dadfd8)- prepare for supporting comfortable version of environment overrides (
45c964a) - remove
File::from_env_paths(). (98d45c2) File::new_globals()can instantiate non-local configuration with zero-configuration. (146eeb0)- Classify
Sourcein accordance for what git actually does. (97374e4) Source::storage_location()to know where files should be located. (e701e05)file::ValueMut::(section|into_section_mut)()to go from value to the owning section. (fff0884)Source::is_in_repository()to find out if a source is in the repository. (f5f2d9b)parse::keyto parse aremote.origin.url-like key to identify a value (91e718f)- maintain newline format depending on what's present or use platform default. (
f7bd2ca) - prepare for passing through newline (
3c06f88) - Add
File::detect_newline_style(), which does at it says. (26147a7) - fix docs (
78e85d9) - a test for lossy File parsing (
5e8127b) - 'lossy' is now inherited by includes processing (
88c6b18) - untangle
file::init::…OptionandErrortypes. (230a523) - Support for
lossyload mode. (d003c0f) - :Events::from_bytes()
withfiltersupport. ([32d5b3c`](https://github.com/Byron/gitoxide/commit/32d5b3c695d868ba93755123a25b276bfbe55e0a)) - try to fix attributes, once more (
a50a396) File::frontmatter()andFile::sections_and_postmatter(). (0ad1c9a)- add
_filter()versions to most access methods. (1ea26d8) - even better handling of newlines (
50c1753) - refactor (
df94c67) - rename
parse::Comment::(comment_tag|comment)to::tag|textandparse::Section::section_headerto::header. (3f3ff11) parse::Event::to_bstr_lossy()to get a glimpse at event content. (fc7e311)- finally fix newline behaviour (
c70e135) - Be smarter about which newline style to use by guessing it based onprior events (
25ed92e) File::append()can append one file to another rather losslessly. (09966a8)- A test to validate frontmatter isn't currently handled correctly when appending (
4665e87) file::Section::meta()to access a section's metadata. (56ae574)- refactor (
d60025e) File::sections()to obtain an iterator over all sections, in order. (6f97bf0)- Associate
file::Metadatawith eachFile. (6f4eea9) - rename
file::SectionBodytofile::section::Body. (b672ed7) - Remove
File::sections_by_name_with_header()as::sections_by_name()now returns entire sections. (3bea26d) - A way to more easily set interpolation even without following includes. (
9aa5acd) - create
resolve_includesoptions to make space for more options when loading paths. (41b3e62) - rename
path::Optionsintopath::Context. (cabc8ef) - try to fix attributes, once more (
207e483) - validate incoming conifguration keys when interpreting envirnoment variables. (
0d07ef1) - try to fix filter settings, but it doesn't seem to work (
9750b7a) - sketch new section and metadata (
9cb9acb) - add
Sourcetype to allow knowing where a particular value is from. (c92d5c6) Booleancan use numbers to indicate true or false, drops support foroneandzero. (6b90184)- All accessors in
Fileare now usingimpl AsRef<str>where possible for added comfort. (3de0cfd) - Much more comfortable API
file::*Muttypes thanks toimpl Into/AsRef. (3d25fe6) - Rename
Mutable*into$1Mutfor consistency. (393b392) file::MutableSection::remove()now actually removes keys and values. (94dde44)- many more tests for MutableSection (
ac843cb) - refactor (
701266e) - conform APIs of
file::MutableValueandfile::MutableMultiValue. (0a7391a) file::MutableMultiValueescapes input values and maintains key separator specific whitespace. (048b925)- place spaces around
key = valuepairs, or whatever is used in the source configuration. (5418bc7) - avoid extra copies when setting values and escaping them (
a7eff01) - refactor (
15cd1d2) - more empty-value tests (
511985a) - default space is just a single tab, not two ones (
7e03b83) - proper escaping of value bytes to allow round-tripping after mutation (
8118644) - refactor (
afa736a) - a few tests for
MutableValueshowing that it's too buggy right now (5e6f9d9) - rename
file::MutableSection::set_leading_space()toset_leading_whitespace(). (83a0922) - whitespace in newly pushed keys is derived from first section value. (
9f59356) File::from_str()implementation, to supportlet config: File = "[core]".parse()?(db1f34d)- whitespace in mutable sections can be finely controlled, and is derived from existing sections (
9157717) - refactor (
c88eea8) - refactor (
a0d6caa) - auto-compute whitespace for sections, even though it probably needs to be better than that (
ee9ac95) - validation for Keys and header names (
59ec7f7) - Simplify specifying keys when mutating config values. (
a93a156) File::rename_section()with validation of input arguments. (895ce40)- re-add newlines after multi-line values (
9a2f597) - more header escaping tests (
12cf005) - Enforce
parse::section::Header::new()by making its fields private. (219cf7a) parse::Header::new(…)with sub-section name validation (ae3895c)- section names are now validated. (
cfd974f) - prepare for validation of
parse::section::Header(00592f6) - basic escaping of subsection names during serialization (
00d1a9b) - refactor (
9fac8e0) - new roundtrip test on file level (
78bb93c) - Add
File::write_to()andFile::to_bstring(); remove someTryFromimpls. (4f6cd8c) - remove
Integer::to_bstring()as well as someTryFromimpls. (0e392f8) - remove
Boolean::to_bstring()along with a fewFromimpls. (b22732a) - Add
parse::(Event|section::Header|Comment)::write_to(…). (d087f12) - fix tests on windows (
3d7fc18) - value normalization (via
value::normalize()handles escape sequences. (f911707) - refactor normalization and more tests (
cf3bf4a) - more escape characters for normalization (
b92bd58) - review docs of
file::mutating(2d5703e) - stable sort order for
File::sections_by_name_with_header()(44dfec0) - review
file::rawmodule (6acf4a4) - don't over-normalize in comfort layer - all values are normalized now (
b979a3b) - docs for comfort level File API (
eafc6ce) - review and refactor 'File::value' module (
7aa8a0b) - allocation free
File::sections_by_name()andFile::sections_by_name_with_header(). (65c520c) - refactor (
2abffd6) - refactor (
539c2f6) - refactor (
f1668e9)
- final documentation review + adjustments prior to release candidate (
Lines 1–500 of 1704. Load more
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.7.0 (2022-08-24) ### Chore - <csr-id-f7f136dbe4f86e7dee1d54835c420ec07c96cd78/> uniformize deny attributes ### New Features - <csr-id-9937d0e00df3a523484c7ae2850be2712a1a4c9a/> `File::set_raw_value_filter()` to set values only in sections passing a filter. - <csr-id-17455c9d93ad38bfee2560f5a4e60324dee3b4e5/> `File::section_mut_or_create_new_filter()` to allow chosing which sections to add values to. - <csr-id-5902f54b93101a6290fcf89f9f13fdbea3678e00/> `File::section_mut_or_create_new(…)` to obtain an existing or new section for mutation. - <csr-id-b1c40b0364ef092cd52d03b34f491b254816b18d/> use docsrs feature in code to show what is feature-gated automatically on docs.rs - <csr-id-517677147f1c17304c62cf97a1dd09f232ebf5db/> pass --cfg docsrs when compiling for https://docs.rs ### Bug Fixes - <csr-id-08c50a47fa901457194539c7db74ad47ab2f8b60/> Properly handle boolean values such that `a` is true but `a=` is false. This is even consistent when no booleans are used, such that `a` has no value as if it is not present, it's only available for booleans which must be specified. - <csr-id-7c585162454c476fe93f032c8a2329cffd7c054f/> Keep track of a severe limitation and prepare tests for fixing it. This also changes behaviour, but merely removes a hack in `Boolean` which considered empty strings true, even though they are supposed to be false. ### Changed (BREAKING) - <csr-id-2b2357e9cc54539e0dbe7c0e22802f2b884160d8/> Add `File::set_raw_value()` to unconditionally set single values, and make the value itself easier to provide. ### New Features (BREAKING) - <csr-id-b6cd6ace412b0c0df4bacbe7ed7ef6608f27909c/> `file::SectionMut::push()` now supports values without key-value separator. These make a difference as those without `=` are considered boolean true. Currently pushing onto a section is the only way to write them. ### Other (BREAKING) - <csr-id-69ec5940d3f37eb4dace8f1ed7616b5988984d15/> `File::set_raw_[multi_]value()` to `::set_existing_raw_[multi_]value`. This makes clear that the method will fail if the value doesn't yet exist. ### Commit Statistics <csr-read-only-do-not-edit/> - 19 commits contributed to the release over the course of 3 calendar days. - 6 days passed between releases. - 11 commits where understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#450](https://github.com/Byron/gitoxide/issues/450) ### Thanks Clippy <csr-read-only-do-not-edit/> [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details <csr-read-only-do-not-edit/> <details><summary>view details</summary> * **[#450](https://github.com/Byron/gitoxide/issues/450)** - Properly handle boolean values such that `a` is true but `a=` is false. ([`08c50a4`](https://github.com/Byron/gitoxide/commit/08c50a47fa901457194539c7db74ad47ab2f8b60)) - fix config tests on windows ([`7a871c2`](https://github.com/Byron/gitoxide/commit/7a871c2a5691ae973804ff66af9608070733b366)) - Keep track of a severe limitation and prepare tests for fixing it. ([`7c58516`](https://github.com/Byron/gitoxide/commit/7c585162454c476fe93f032c8a2329cffd7c054f)) - `file::SectionMut::push()` now supports values without key-value separator. ([`b6cd6ac`](https://github.com/Byron/gitoxide/commit/b6cd6ace412b0c0df4bacbe7ed7ef6608f27909c)) - refactor ([`5415449`](https://github.com/Byron/gitoxide/commit/541544953c52ff3df8c8e21f6aca366840faca3e)) - `File::set_raw_value_filter()` to set values only in sections passing a filter. ([`9937d0e`](https://github.com/Byron/gitoxide/commit/9937d0e00df3a523484c7ae2850be2712a1a4c9a)) - `File::section_mut_or_create_new_filter()` to allow chosing which sections to add values to. ([`17455c9`](https://github.com/Byron/gitoxide/commit/17455c9d93ad38bfee2560f5a4e60324dee3b4e5)) - Add `File::set_raw_value()` to unconditionally set single values, and make the value itself easier to provide. ([`2b2357e`](https://github.com/Byron/gitoxide/commit/2b2357e9cc54539e0dbe7c0e22802f2b884160d8)) - `File::section_mut_or_create_new(…)` to obtain an existing or new section for mutation. ([`5902f54`](https://github.com/Byron/gitoxide/commit/5902f54b93101a6290fcf89f9f13fdbea3678e00)) - `File::set_raw_[multi_]value()` to `::set_existing_raw_[multi_]value`. ([`69ec594`](https://github.com/Byron/gitoxide/commit/69ec5940d3f37eb4dace8f1ed7616b5988984d15)) * **Uncategorized** - Release git-path v0.4.1 ([`5e82346`](https://github.com/Byron/gitoxide/commit/5e823462b3deb904f5d6154a7bf114cef1988224)) - Merge branch 'example-write-blob' ([`afedd7f`](https://github.com/Byron/gitoxide/commit/afedd7f86ec8ea18a8165f71698ecc886f5cf643)) - Merge pull request #494 from ultrasaurus/patch-1 ([`86fe22c`](https://github.com/Byron/gitoxide/commit/86fe22cb1aad5944a229bc2a5252b36ef1fd59ef)) - thanks clippy ([`2770431`](https://github.com/Byron/gitoxide/commit/2770431f8742d6249574f53f06ec0026f9d241d6)) - Merge branch 'main' into remote-ls-refs ([`95f2f4f`](https://github.com/Byron/gitoxide/commit/95f2f4f17f7eae174a64c7d9f6a1513d73b21bbb)) - Merge branch 'example-new-repo' ([`946dd3a`](https://github.com/Byron/gitoxide/commit/946dd3a80522ef437e09528a93aa1433f01b0ee8)) - use docsrs feature in code to show what is feature-gated automatically on docs.rs ([`b1c40b0`](https://github.com/Byron/gitoxide/commit/b1c40b0364ef092cd52d03b34f491b254816b18d)) - uniformize deny attributes ([`f7f136d`](https://github.com/Byron/gitoxide/commit/f7f136dbe4f86e7dee1d54835c420ec07c96cd78)) - pass --cfg docsrs when compiling for https://docs.rs ([`5176771`](https://github.com/Byron/gitoxide/commit/517677147f1c17304c62cf97a1dd09f232ebf5db)) </details> ## 0.6.1 (2022-08-17) A maintenance release without user facing changes. ### Commit Statistics <csr-read-only-do-not-edit/> - 10 commits contributed to the release over the course of 26 calendar days. - 26 days passed between releases. - 0 commits where understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#482](https://github.com/Byron/gitoxide/issues/482) ### Thanks Clippy <csr-read-only-do-not-edit/> [Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. ### Commit Details <csr-read-only-do-not-edit/> <details><summary>view details</summary> * **[#482](https://github.com/Byron/gitoxide/issues/482)** - refactor ([`1ee9918`](https://github.com/Byron/gitoxide/commit/1ee991847a5adeaaeb6e80ae626c28b0ba89e0af)) * **Uncategorized** - Release git-date v0.0.3, git-actor v0.11.1, git-attributes v0.3.1, git-tempfile v2.0.3, git-object v0.20.1, git-ref v0.15.1, git-config v0.6.1, git-diff v0.17.1, git-discover v0.4.0, git-bitmap v0.1.1, git-index v0.4.1, git-mailmap v0.3.1, git-traverse v0.16.1, git-pack v0.21.1, git-odb v0.31.1, git-packetline v0.12.6, git-url v0.7.1, git-transport v0.19.1, git-protocol v0.18.1, git-revision v0.4.0, git-worktree v0.4.1, git-repository v0.21.0, safety bump 5 crates ([`c96473d`](https://github.com/Byron/gitoxide/commit/c96473dce21c3464aacbc0a62d520c1a33172611)) - prepare changelogs prior to reelase ([`c06ae1c`](https://github.com/Byron/gitoxide/commit/c06ae1c606b6af9c2a12021103d99c2810750d60)) - Release git-hash v0.9.7, git-features v0.22.1 ([`232784a`](https://github.com/Byron/gitoxide/commit/232784a59ded3e8016e4257c7e146ad385cdd64a)) - Merge branch 'format_git_date_time' ([`99e12be`](https://github.com/Byron/gitoxide/commit/99e12bee16ab3f344c71818bfd1c95cf50e1721b)) - thanks clippy ([`4bd747c`](https://github.com/Byron/gitoxide/commit/4bd747cb3e126fe5b1d540270cfbd731cffd42ef)) - commit strange changes to be able to do anything. ([`237b21d`](https://github.com/Byron/gitoxide/commit/237b21da8465200dcb8b5f7dc324a97bf653a23d)) - commit strange crlf-file that makes everything impossible ([`1dd9f9a`](https://github.com/Byron/gitoxide/commit/1dd9f9a9320813fe5b40578ee4826a1da575c05c)) - make fmt ([`47724c0`](https://github.com/Byron/gitoxide/commit/47724c0edb382c036a3fc99884becfd2b0740d4b)) - Fix typos ([`e9fcb70`](https://github.com/Byron/gitoxide/commit/e9fcb70e429edb2974afa3f58d181f3ef14c3da3)) </details> ## 0.6.0 (2022-07-22) <csr-id-32d5b3c695d868ba93755123a25b276bfbe55e0a/> <csr-id-9cd99337333f5ef4b30e0ec9461fc087699576e6/> <csr-id-0076dcf9b37f1d633bdad5573b40d34a9fbaba90/> <csr-id-a8604a237782f8d60a185d4730db57bad81424a6/> ### New Features - <csr-id-1bc96bf378d198b012efce9ec9e5b244a91f62bc/> following includes is now non-fatal by default Otherwise it would be relatively easy to fail gitoxide startup, and we want to be closer to the behaviour in git which ignores most of the errors. - <csr-id-f9ce1b5411f1ac788f71060ecf785dda9dfd87bf/> `File::from_git_dir()` as comfortable way to instantiate most complete git configuration. - <csr-id-14a68a6a78a09f8ae56e30e3b7501de66ef31fdc/> `File` now compares actual content, ignoring whitespace and comments. - <csr-id-7dadfd82494d47e36d3f570988eaf3c6b628977f/> `File::new_environment_overrides()` to easily instantiate overrides from the environment. - <csr-id-146eeb064822839bc46fd37a247a1b9a84f64e40/> `File::new_globals()` can instantiate non-local configuration with zero-configuration. - <csr-id-e701e053fd05850973930be0cefe73e8f3604d40/> `Source::storage_location()` to know where files should be located. - <csr-id-fff088485dd5067976cc93d525903b39aafea76a/> `file::ValueMut::(section|into_section_mut)()` to go from value to the owning section. This can be useful if the value was obtained using `raw_value_mut()`. - <csr-id-f5f2d9b3fef98d9100d713f9291510fa4aa27867/> `Source::is_in_repository()` to find out if a source is in the repository. - <csr-id-91e718f0e116052b64ca436d7c74cea79529e696/> `parse::key` to parse a `remote.origin.url`-like key to identify a value - <csr-id-26147a7a61a695eda680808ee4aab44a890b2964/> Add `File::detect_newline_style()`, which does at it says. - <csr-id-0ad1c9a5280cc172432b5258e0f79898721bac68/> `File::frontmatter()` and `File::sections_and_postmatter()`. - <csr-id-fc7e311b423c5fffb8240d9d0f917ae7139a6133/> `parse::Event::to_bstr_lossy()` to get a glimpse at event content. - <csr-id-09966a8ea4eaa3e0805e04188de86dd1bac9f388/> `File::append()` can append one file to another rather losslessly. The loss happens as we, maybe for the wrong reasons, automatically insert newlines where needed which can only be done while we still know the file boundaries. - <csr-id-56ae5744e8957e617f3a0ebc4d725846b18d93f8/> `file::Section::meta()` to access a section's metadata. - <csr-id-6f97bf0c3e7164855cf5aa53462dbc39c430e03f/> `File::sections()` to obtain an iterator over all sections, in order. - <csr-id-5418bc70e67476f8778656f2d577f1f9aa65ffbe/> place spaces around `key = value` pairs, or whatever is used in the source configuration. - <csr-id-8118644625dc25b616e5f33c85f5100d600766e4/> proper escaping of value bytes to allow round-tripping after mutation - <csr-id-9f59356b4f6a1f5f7f35a62c9fbe4859bf8e8e5f/> whitespace in newly pushed keys is derived from first section value. That way, newly added key-value pairs look like they should assuming all keys have the same indentation as the first key in the section. If there is no key, then the default whitespace will be double-tabs like what's commmon in git. - <csr-id-db1f34dfb855058ac08e97d4715876b5db712f61/> `File::from_str()` implementation, to support `let config: File = "[core]".parse()?` - <csr-id-9157717c2fb143b5decbdf60d18cc2bd99dde775/> whitespace in mutable sections can be finely controlled, and is derived from existing sections - <csr-id-ae3895c7882e0a543a44693faee5f760b49b54d7/> `parse::Header::new(…)` with sub-section name validation - <csr-id-d087f12eec73626eb327eaacef8ebb3836b02381/> Add `parse::(Event|section::Header|Comment)::write_to(…)`. Now it's possible to serialize these types in a streaming fashion and without arbitrarily enforcing UTF-8 on it - <csr-id-5a8f242ee98793e2467e7bc9806f8780b9d320ce/> `serde1` feature to add limited serde support ### Bug Fixes - <csr-id-6c1588fd1a2fa80fd866787cbf4bcc6e5b51abe6/> maintain insertion order of includes on per-section basis at least. Note that git inserts values right after the include directive, 'splitting' the section, but we don't do that and insert new values after the section. Probably no issue in practice while keeping our implementation simple. - <csr-id-f7bd2caceb87a179288030e0771da2e4ed6bd1e4/> maintain newline format depending on what's present or use platform default. Previously implicit newlines when adding new sections or keys to sections was always `\n` which isn't correct on windows. Now the newline style is detected and used according to what's present, or in the lack of content, defaults to what's correct for the platform. - <csr-id-0d07ef1aa4a9e238c20249d4ae2ed19e6740308a/> validate incoming conifguration keys when interpreting envirnoment variables. - <csr-id-6b901843cb18b3d31f8b0b84bb9ebbae279aff19/> `Boolean` can use numbers to indicate true or false, drops support for `one` and `zero`. - <csr-id-94dde44e8dd1a0b8d4e11f2627a3f6b345a15989/> `file::MutableSection::remove()` now actually removes keys _and_ values. - <csr-id-048b92531eb877a5a128e702504891bf1e31becf/> `file::MutableMultiValue` escapes input values and maintains key separator specific whitespace. - <csr-id-f911707b455ba6f3800b85f667f91e4d56027b91/> value normalization (via `value::normalize()` handles escape sequences. The latter ones are `\n`, `\t` and `\b` which are the only supported ones in values of git-config files. - <csr-id-44dfec07480cc2ac6fd01674b748cc03af51fed1/> stable sort order for `File::sections_by_name_with_header()` - <csr-id-1ea919d5ff81ab7b01b8201386ef63c7e081b537/> count newlines (for error display) in multi-line values as well - <csr-id-1e71e71c984289f0d7e0a39379ee6728918b7dc5/> auto-normalize string values to support quote removal in case of strings. Related to https://github.com/starship/starship/pull/3883 . ### Other - <csr-id-32d5b3c695d868ba93755123a25b276bfbe55e0a/> :Events::from_bytes()` with `filter` support. ### Changed (BREAKING) - <csr-id-17c83d55f8942788aac5eb1bea22a48daa045bf4/> add `File::resolve_includes()` and move its error type to `file::includes`. - <csr-id-5221676e28f2b6cc1a7ef1bdd5654b880965f38c/> add `File::from_bytes_owned()` and remove `File::from_path_with_buf()` - <csr-id-98d45c2f59863fdee033b38e757cec09593f6892/> remove `File::from_env_paths()`. It's replaced by its more comfortable `new_globals()`. - <csr-id-230a523593afcfb8720db965ff56265aaceea772/> untangle `file::init::…` `Option` and `Error` types. This moves types to where they belong which is more specific instead of having a catch-all `Error` and `Options` type. - <csr-id-3f3ff11a6ebe9775ee5ae7fc0ec18a94b5b46d61/> rename `parse::Comment::(comment_tag|comment)` to `::tag|text` and `parse::Section::section_header` to `::header`. - <csr-id-6f4eea936d64fb9827277c160f989168e7b1dba2/> Associate `file::Metadata` with each `File`. This is the first step towards knowing more about the source of each value to filter them based on some properties. This breaks various methods handling the instantiation of configuration files as `file::Metadata` typically has to be provided by the caller now or be associated with each path to read configuration from. - <csr-id-b672ed7667a334be3d45c59f4727f12797b340da/> rename `file::SectionBody` to `file::section::Body`. - <csr-id-3bea26d7d2a9b5751c6c15e1fa9a924b67e0159e/> Remove `File::sections_by_name_with_header()` as `::sections_by_name()` now returns entire sections. - <csr-id-41b3e622ee71943c285eadc518150fc7b6c92361/> create `resolve_includes` options to make space for more options when loading paths. - <csr-id-cabc8ef0e31c954642525e7693009a7fe4b4c465/> rename `path::Options` into `path::Context`. It's not an option if it's required context to perform a certain operation. - <csr-id-3de0cfd81523e4ba7cc362d8625f85ebf8fd9172/> All accessors in `File` are now using `impl AsRef<str>` where possible for added comfort. - <csr-id-3d25fe6c7a52529488fab19c927d64a1bc75838f/> Much more comfortable API `file::*Mut` types thanks to `impl Into/AsRef`. - <csr-id-393b392d515661e5c3e60629319fdab771c3d3f0/> Rename `Mutable*` into `$1Mut` for consistency. - <csr-id-0a7391a6575f4035c51a46d34fa20c69e9d078e9/> conform APIs of `file::MutableValue` and `file::MutableMultiValue`. There are more renames and removals than worth mentioning here given the current adoption of the crate. - <csr-id-83a0922f06081312b79908835dac2b7f4e849bb3/> rename `file::MutableSection::set_leading_space()` to `set_leading_whitespace()`. The corresponding getter was renamed as well to `leading_whitespace()`. - <csr-id-219cf7ae0b35b3ac92f97974be52cd022698e01f/> Enforce `parse::section::Header::new()` by making its fields private. - <csr-id-4f6cd8cf65c2d8698bffe327a19031c342b229a6/> Add `File::write_to()` and `File::to_bstring()`; remove some `TryFrom` impls. Now `File` can be serialized in a streaming fashion and without the possibility for UTF8 conversion issues. Note that `Display` is still imlpemented with the usual caveats. - <csr-id-0e392f81e99c8c0ff29f41b9b86afd57cd99c245/> remove `Integer::to_bstring()` as well as some `TryFrom` impls. Note that it can still display itself like before via `std::fmt::Display`. - <csr-id-b22732a2ab17213c4a1020859ec41f25ccabfbfc/> remove `Boolean::to_bstring()` along with a few `From` impls. These were superfluous and aren't useful in practice. Note that serialization is still implemented via `Display`. - <csr-id-65c520c4de8187884f87059adf5cef9cbdcd90a2/> allocation free `File::sections_by_name()` and `File::sections_by_name_with_header()`. - <csr-id-ac57c4479e7b6867e8b8e71f7cf76de759dc64a2/> `Path::interpolate()` now takes `path::interpolate::Options` instead of three parameters. - <csr-id-0915051798dd782b40617a1aa16abd71f6db1175/> remove `String` type in favor of referring to the `File::string()` method. The wrapper had no effect whatsoever except for adding complexity. - <csr-id-9cadc6f0cbaad0ac23f5469db2f040aecfbfb82c/> Simplify `Boolean` to be a wrapper around `bool`. Previously it tried hard not to degenerate information, making it a complicated type. However, in practice nobody cares about the exact makeup of the boolean, and there is no need to serialize a boolean faithfully either. Instead, those who want to set a value just set any value as a string, no need for type safety there, and we take care of escaping values properly on write. - <csr-id-703922dd4e1e5b27835298217ff4eb8ef1dc57ce/> Use bitflags for `color::Attribute` instead of `Vec` of enums. This is less wasteful and sufficient for git, so it should be sufficient for us, especially since attributes are indeed a set and declaring one twice has no effect. - <csr-id-3fc4ac04f46f869c6e3a94ce4bb8a5737aa0c524/> simplify `Color` API. For now we only parse and serialize for display, but more uses are enabled when needed and trivially. - <csr-id-14149eea54e2e8a25ac0ccdb2f6efe624f6eaa22/> remove `parse::Events::from_path` and `File::at` The latter has been replaced with `File::from_path_with_buf(…)` and is a low-level way to load just a single config file, purposefully uncomfortable as it will not resolve includes. The initialization API will need some time to stabilize. - <csr-id-73adceeae12270c0d470d4b7271c1fd6089d5c2d/> Slim down API surface of `parse::Events`. It's more of a 'dumb' structure now than before, merely present to facilitate typical parsing than something special on its own. - <csr-id-2e47167e4a963743494b2df6b0c15800cb876dd0/> remove `File::new()` method in favor of `File::default()`. - <csr-id-ea6765093b5475912ba1aa81d4440cbf5dd49fb6/> rename `parse::event::List` to `parse::Events` - <csr-id-89f5fca843d999c5bea35fb3fe2a03dc3588f74e/> rename `parse::State` to `parse::event::List` - <csr-id-3cdb0890b71e62cfa92b1ed1760c88cb547ec729/> move `value::*` into the crate root, except for `Error` and `normalize_*()`. - <csr-id-748d921efd7469d5c19e40ddcb9099e2462e3bbc/> rename `value::parse::Error` to `value::Error`. - <csr-id-7e8a22590297f2f4aab76b53be512353637fb651/> rename `value::TrueVariant` to `value::boolean::True` - <csr-id-8bcaec0599cf085a73b344f4f53fc023f6e31430/> rename `IntegerSuffix` to `integer::Suffix` - <csr-id-d085037ad9c067af7ce3ba3ab6e5d5ddb45b4057/> rename `value::Color(Attribute|Value)` to `value::color::Attribute` and `value::color::Name`. - <csr-id-a0f6252343a62b0b55eef02888ac00c09100687a/> Turn `parse::ParseOrIoError` into `parse::state::from_path::Error` - <csr-id-b6b31e9c8dd8b3dc4860431069bb1cf5eacd1702/> rename `parse::ParsedComment` into `parse::Comment` - <csr-id-239cbfb450a8cddfc5bec1de21f3dc54fab914ce/> rename `parse::Section*` related types. These are now located in `section::*`. - <csr-id-60af4c9ecb1b99f21df0e8facc33e5f6fc70c424/> rename `parse::Parser` to `parse::State`. Furthermore, make `State` the entry point for all parsing, removing all free-standing functions that returned a `State`. - <csr-id-3724850e0411f1f76e52c6c767fd8cebe8aea0f6/> rename `parser` module to `parse` - <csr-id-58b22152a0295998935abb43563e9096589ef53e/> rename `normalize_cow()` to `normalize()` and move all `normalize*` functions from `values` to the `value` module - <csr-id-767bedccdae1f3e6faf853d59ecf884a06cc3827/> move `Path` from `values` to `value` module - <csr-id-6033f3f93d2356399a661567353a83a044662699/> Move `Boolean` and `String` from `values` into `value` module - <csr-id-d4444e18042891b0fe5b9c6e6813fed26df6c560/> move `values::Integer` into `value` module - <csr-id-38f31174e8c117af675cdfbc21926133b821ec38/> move `Color` to own `value` module - <csr-id-aa630ad6ec2c6306d3307d5c77e272cb24b00ddd/> remove `values::Bytes` - use `values::String` instead. Note that these values are always normalized and it's only possible to get a raw values using the `raw_value()` API. ### New Features (BREAKING) - <csr-id-d003c0f139d61e3bd998a0283a9c7af25a60db02/> Support for `lossy` load mode. There is a lot of breaking changes as `file::from_paths::Options` now became `file::init::Options`, and the same goes for the error type. - <csr-id-1ea26d80f392114349d25ebf88a7b260ee822aa1/> add `_filter()` versions to most access methods. That way it's possible to filter values by their origin. Note that the `remove_section()` methods now return the entire removed section, not just the body, which yields more information than before including section metadata. - <csr-id-cfd974f46d2cbb99e7784a05f5e358fed0d4bcab/> section names are now validated. - <csr-id-6ba2f8060768978ad7204e162fb2253ca8843879/> filtering supportort for `parse::Events`. That way it's possible to construct Files which are not destined to be written back as they only keep events necessary for value access, greatly reducing allocations. - <csr-id-311d4b447daf8d4364670382a20901468748d34d/> change mostily internal uses of [u8] to BString/BStr - <csr-id-edd226719cd04a480274cb7d983b6d5d8bfdbb13/> Path-interpolation makes `home-dir` configurable. That way the caller has full control over how the environment is used, which also allows more fine-grained control over which config files can be included. ### Bug Fixes (BREAKING) - <csr-id-a93a156655d640ae63ff7c35b0a1f5d67a5ca20f/> Simplify specifying keys when mutating config values. - <csr-id-895ce40aabbe6d6af5b681a0d0942303fd6549a2/> `File::rename_section()` with validation of input arguments. - <csr-id-4a01d983f54a7713dea523f6032cbf5bb2b9dde8/> improve normalization; assure no extra copies are made on query. We now return our own content, rather than the originals with their lifetimes, meaning we bind lifetimes of returned values to our own `File` instance. This allows them to be referenced more often, and smarter normalization assures we don't copy in the simple cases either. More tests were added as well. This is breaking as lifetime changes can cause distruptions, and `values?_as()` was removed as well as it's somewhat duplicate to higher-level APIs and it wasn't tested at all. - <csr-id-c9933c0b0f51d21dc8244b2acc33d7dc8a33f6ce/> Remove `git-config` test utilities from `git-path`. ### Other (BREAKING) - <csr-id-9cd99337333f5ef4b30e0ec9461fc087699576e6/> `File::raw_multi_value()` to `File::raw_values()` - <csr-id-0076dcf9b37f1d633bdad5573b40d34a9fbaba90/> `File::raw_multi_value_mut()` to `File::raw_values_mut()` - <csr-id-a8604a237782f8d60a185d4730db57bad81424a6/> `File::multi_value()` to `File::values()`. The latter is better in line with `string()/strings()` ### Commit Statistics <csr-read-only-do-not-edit/> - 316 commits contributed to the release over the course of 33 calendar days. - 39 days passed between releases. - 93 commits where understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#331](https://github.com/Byron/gitoxide/issues/331) ### Thanks Clippy <csr-read-only-do-not-edit/> [Clippy](https://github.com/rust-lang/rust-clippy) helped 19 times to make code idiomatic. ### Commit Details <csr-read-only-do-not-edit/> <details><summary>view details</summary> * **[#331](https://github.com/Byron/gitoxide/issues/331)** - final documentation review + adjustments prior to release candidate ([`06b86e0`](https://github.com/Byron/gitoxide/commit/06b86e05dd9a712d26456b43c8da0a11870f08df)) - refactor ([`4dc6594`](https://github.com/Byron/gitoxide/commit/4dc6594686478d9d6cd09e2ba02048624c3577e7)) - exclude particular assertion which fails on the linux CI. ([`5e0f889`](https://github.com/Byron/gitoxide/commit/5e0f889c1edb862d698a2d344a61f12ab3b6ade7)) - first sketch of using configuration and environment variables for author/committer ([`330d0a1`](https://github.com/Byron/gitoxide/commit/330d0a19d54aabac868b76ef6281fffdbdcde53c)) - remove `Permissions` as there is no need for that here. ([`1954ef0`](https://github.com/Byron/gitoxide/commit/1954ef096a58aedb9f568a01e439d5a5cb46c40d)) - following includes is now non-fatal by default ([`1bc96bf`](https://github.com/Byron/gitoxide/commit/1bc96bf378d198b012efce9ec9e5b244a91f62bc)) - Allow to skip non-existing input paths without error ([`989603e`](https://github.com/Byron/gitoxide/commit/989603efcdf0064e2bb7d48100391cabc810204d)) - `File::from_git_dir()` as comfortable way to instantiate most complete git configuration. ([`f9ce1b5`](https://github.com/Byron/gitoxide/commit/f9ce1b5411f1ac788f71060ecf785dda9dfd87bf)) - Add a way to load multiple configuration files without allocating a read buffer ([`acb4520`](https://github.com/Byron/gitoxide/commit/acb4520a88ab083640c80a7f23a56a2ca3cda335)) - refactor ([`ec21e95`](https://github.com/Byron/gitoxide/commit/ec21e95f4d9ffac771410947923f27187e88321a)) - move `Env` test utility into `git-testtools` ([`bd3f4d0`](https://github.com/Byron/gitoxide/commit/bd3f4d014dd7df7a1e25defa8eea7253eec1560a)) - refactor ([`b073e29`](https://github.com/Byron/gitoxide/commit/b073e2930bed60ccedadd1709cfaa8889e02ffe3)) - another failing tests that can't be fixed without a refactor ([`e4d8fd7`](https://github.com/Byron/gitoxide/commit/e4d8fd72f1f648a29e56e487827f2328bfc08d03)) - an attempt to hack newline handling into place for windows newlines ([`dac1463`](https://github.com/Byron/gitoxide/commit/dac146343a0fbe96b6c0990f4fd4e976e0359a7e)) - Serialize lossily-read configuration files correctly anyway. ([`cfda0c3`](https://github.com/Byron/gitoxide/commit/cfda0c335d759cae0b23cef51f7b85a5f4b11e82)) - multi-path include test ([`3d89a46`](https://github.com/Byron/gitoxide/commit/3d89a46bf88b1fb5b4aa5da9fd12c7e310be3f9d)) - refactor ([`8a7fb15`](https://github.com/Byron/gitoxide/commit/8a7fb15f78ce16d5caedd7656e8aa98e72f248a6)) - fix windows tests ([`fbcf40e`](https://github.com/Byron/gitoxide/commit/fbcf40e16b8fc1ff97dbed2bc22b64bd44a8b99d)) - finally proper whitespace handling in all the right places for perfect roundtripping to/from string ([`97e5ede`](https://github.com/Byron/gitoxide/commit/97e5ededb0390c1b4f296a35903433de9c519821)) - serializations maintains some invariants about whitespace where possible. ([`ee10dd5`](https://github.com/Byron/gitoxide/commit/ee10dd5a8ae0dabfee21c1ce146e92c3c9635e8a)) - refactor ([`9c248ee`](https://github.com/Byron/gitoxide/commit/9c248eeb015495f910f48ce5df3c8fcce905dba7)) - `File` now compares actual content, ignoring whitespace and comments. ([`14a68a6`](https://github.com/Byron/gitoxide/commit/14a68a6a78a09f8ae56e30e3b7501de66ef31fdc)) - maintain insertion order of includes on per-section basis at least. ([`6c1588f`](https://github.com/Byron/gitoxide/commit/6c1588fd1a2fa80fd866787cbf4bcc6e5b51abe6)) - allow insertion of sections while preserving order ([`f5580a3`](https://github.com/Byron/gitoxide/commit/f5580a3635289d96e662aab00e60d801c4e34e1c)) - a test showing that include ordering isn't correct compared to the including config. ([`4e47df5`](https://github.com/Byron/gitoxide/commit/4e47df5332810f6e46ab682a68e870220ba3a6fb)) - add `File::resolve_includes()` and move its error type to `file::includes`. ([`17c83d5`](https://github.com/Byron/gitoxide/commit/17c83d55f8942788aac5eb1bea22a48daa045bf4)) - add `File::from_bytes_owned()` and remove `File::from_path_with_buf()` ([`5221676`](https://github.com/Byron/gitoxide/commit/5221676e28f2b6cc1a7ef1bdd5654b880965f38c)) - make it necessary to deal with the possibility of no-input in `from_paths_metadata()` . ([`612645f`](https://github.com/Byron/gitoxide/commit/612645f74ffc49229ccd783361b4d455e2284ac0)) - Don't fail on empty input on the comfort level ([`61ecaca`](https://github.com/Byron/gitoxide/commit/61ecaca43fb871eaff5cf94a8e7f9cc9413a5a77)) - `File::new_environment_overrides()` to easily instantiate overrides from the environment. ([`7dadfd8`](https://github.com/Byron/gitoxide/commit/7dadfd82494d47e36d3f570988eaf3c6b628977f)) - prepare for supporting comfortable version of environment overrides ([`45c964a`](https://github.com/Byron/gitoxide/commit/45c964a3f581dc7d3090bbbe26f188d553783fb3)) - remove `File::from_env_paths()`. ([`98d45c2`](https://github.com/Byron/gitoxide/commit/98d45c2f59863fdee033b38e757cec09593f6892)) - `File::new_globals()` can instantiate non-local configuration with zero-configuration. ([`146eeb0`](https://github.com/Byron/gitoxide/commit/146eeb064822839bc46fd37a247a1b9a84f64e40)) - Classify `Source` in accordance for what git actually does. ([`97374e4`](https://github.com/Byron/gitoxide/commit/97374e4d867e82d7be04da2eaa6ef553e0d9a7ff)) - `Source::storage_location()` to know where files should be located. ([`e701e05`](https://github.com/Byron/gitoxide/commit/e701e053fd05850973930be0cefe73e8f3604d40)) - `file::ValueMut::(section|into_section_mut)()` to go from value to the owning section. ([`fff0884`](https://github.com/Byron/gitoxide/commit/fff088485dd5067976cc93d525903b39aafea76a)) - `Source::is_in_repository()` to find out if a source is in the repository. ([`f5f2d9b`](https://github.com/Byron/gitoxide/commit/f5f2d9b3fef98d9100d713f9291510fa4aa27867)) - `parse::key` to parse a `remote.origin.url`-like key to identify a value ([`91e718f`](https://github.com/Byron/gitoxide/commit/91e718f0e116052b64ca436d7c74cea79529e696)) - maintain newline format depending on what's present or use platform default. ([`f7bd2ca`](https://github.com/Byron/gitoxide/commit/f7bd2caceb87a179288030e0771da2e4ed6bd1e4)) - prepare for passing through newline ([`3c06f88`](https://github.com/Byron/gitoxide/commit/3c06f8889854860b731735a8ce2bf532366003ef)) - Add `File::detect_newline_style()`, which does at it says. ([`26147a7`](https://github.com/Byron/gitoxide/commit/26147a7a61a695eda680808ee4aab44a890b2964)) - fix docs ([`78e85d9`](https://github.com/Byron/gitoxide/commit/78e85d9786a541aa43ad7266e85dc1da5e71a412)) - a test for lossy File parsing ([`5e8127b`](https://github.com/Byron/gitoxide/commit/5e8127b395bd564129b20a1db2d59d39307a2857)) - 'lossy' is now inherited by includes processing ([`88c6b18`](https://github.com/Byron/gitoxide/commit/88c6b185b2e51858b140e4378a5b5730b5cb4075)) - untangle `file::init::…` `Option` and `Error` types. ([`230a523`](https://github.com/Byron/gitoxide/commit/230a523593afcfb8720db965ff56265aaceea772)) - Support for `lossy` load mode. ([`d003c0f`](https://github.com/Byron/gitoxide/commit/d003c0f139d61e3bd998a0283a9c7af25a60db02)) - :Events::from_bytes()` with `filter` support. ([`32d5b3c`](https://github.com/Byron/gitoxide/commit/32d5b3c695d868ba93755123a25b276bfbe55e0a)) - try to fix attributes, once more ([`a50a396`](https://github.com/Byron/gitoxide/commit/a50a3964dbf01982b5a2c9a8ccd469332b6f9ca1)) - `File::frontmatter()` and `File::sections_and_postmatter()`. ([`0ad1c9a`](https://github.com/Byron/gitoxide/commit/0ad1c9a5280cc172432b5258e0f79898721bac68)) - add `_filter()` versions to most access methods. ([`1ea26d8`](https://github.com/Byron/gitoxide/commit/1ea26d80f392114349d25ebf88a7b260ee822aa1)) - even better handling of newlines ([`50c1753`](https://github.com/Byron/gitoxide/commit/50c1753c6389f29279d278fbab1afbd9ded34a76)) - refactor ([`df94c67`](https://github.com/Byron/gitoxide/commit/df94c6737ba642fff40623f406df0764d5bd3c43)) - rename `parse::Comment::(comment_tag|comment)` to `::tag|text` and `parse::Section::section_header` to `::header`. ([`3f3ff11`](https://github.com/Byron/gitoxide/commit/3f3ff11a6ebe9775ee5ae7fc0ec18a94b5b46d61)) - `parse::Event::to_bstr_lossy()` to get a glimpse at event content. ([`fc7e311`](https://github.com/Byron/gitoxide/commit/fc7e311b423c5fffb8240d9d0f917ae7139a6133)) - finally fix newline behaviour ([`c70e135`](https://github.com/Byron/gitoxide/commit/c70e135ecbbce8c696a6ab542ae20f5b5981dfdf)) - Be smarter about which newline style to use by guessing it based onprior events ([`25ed92e`](https://github.com/Byron/gitoxide/commit/25ed92e66bf4345f852e7e84741079c61ae896c8)) - `File::append()` can append one file to another rather losslessly. ([`09966a8`](https://github.com/Byron/gitoxide/commit/09966a8ea4eaa3e0805e04188de86dd1bac9f388)) - A test to validate frontmatter isn't currently handled correctly when appending ([`4665e87`](https://github.com/Byron/gitoxide/commit/4665e876df4ac6ab9135c10ee69b5408b89b5313)) - `file::Section::meta()` to access a section's metadata. ([`56ae574`](https://github.com/Byron/gitoxide/commit/56ae5744e8957e617f3a0ebc4d725846b18d93f8)) - refactor ([`d60025e`](https://github.com/Byron/gitoxide/commit/d60025e317d2b5f34f3569f321845bbb557ba2e7)) - `File::sections()` to obtain an iterator over all sections, in order. ([`6f97bf0`](https://github.com/Byron/gitoxide/commit/6f97bf0c3e7164855cf5aa53462dbc39c430e03f)) - Associate `file::Metadata` with each `File`. ([`6f4eea9`](https://github.com/Byron/gitoxide/commit/6f4eea936d64fb9827277c160f989168e7b1dba2)) - rename `file::SectionBody` to `file::section::Body`. ([`b672ed7`](https://github.com/Byron/gitoxide/commit/b672ed7667a334be3d45c59f4727f12797b340da)) - Remove `File::sections_by_name_with_header()` as `::sections_by_name()` now returns entire sections. ([`3bea26d`](https://github.com/Byron/gitoxide/commit/3bea26d7d2a9b5751c6c15e1fa9a924b67e0159e)) - A way to more easily set interpolation even without following includes. ([`9aa5acd`](https://github.com/Byron/gitoxide/commit/9aa5acdec12a0721543c6bcc39ffe6bd734f9a69)) - create `resolve_includes` options to make space for more options when loading paths. ([`41b3e62`](https://github.com/Byron/gitoxide/commit/41b3e622ee71943c285eadc518150fc7b6c92361)) - rename `path::Options` into `path::Context`. ([`cabc8ef`](https://github.com/Byron/gitoxide/commit/cabc8ef0e31c954642525e7693009a7fe4b4c465)) - try to fix attributes, once more ([`207e483`](https://github.com/Byron/gitoxide/commit/207e483620b29efb029c6ee742c0bb48d54be020)) - validate incoming conifguration keys when interpreting envirnoment variables. ([`0d07ef1`](https://github.com/Byron/gitoxide/commit/0d07ef1aa4a9e238c20249d4ae2ed19e6740308a)) - try to fix filter settings, but it doesn't seem to work ([`9750b7a`](https://github.com/Byron/gitoxide/commit/9750b7a1f01d6f0690221c6091b16c51784df0a3)) - sketch new section and metadata ([`9cb9acb`](https://github.com/Byron/gitoxide/commit/9cb9acb7b7ebada4d6bb3eef199337912ceeaa36)) - add `Source` type to allow knowing where a particular value is from. ([`c92d5c6`](https://github.com/Byron/gitoxide/commit/c92d5c6a223e377c10c2ca6b822e7eeb9070e12c)) - `Boolean` can use numbers to indicate true or false, drops support for `one` and `zero`. ([`6b90184`](https://github.com/Byron/gitoxide/commit/6b901843cb18b3d31f8b0b84bb9ebbae279aff19)) - All accessors in `File` are now using `impl AsRef<str>` where possible for added comfort. ([`3de0cfd`](https://github.com/Byron/gitoxide/commit/3de0cfd81523e4ba7cc362d8625f85ebf8fd9172)) - Much more comfortable API `file::*Mut` types thanks to `impl Into/AsRef`. ([`3d25fe6`](https://github.com/Byron/gitoxide/commit/3d25fe6c7a52529488fab19c927d64a1bc75838f)) - Rename `Mutable*` into `$1Mut` for consistency. ([`393b392`](https://github.com/Byron/gitoxide/commit/393b392d515661e5c3e60629319fdab771c3d3f0)) - `file::MutableSection::remove()` now actually removes keys _and_ values. ([`94dde44`](https://github.com/Byron/gitoxide/commit/94dde44e8dd1a0b8d4e11f2627a3f6b345a15989)) - many more tests for MutableSection ([`ac843cb`](https://github.com/Byron/gitoxide/commit/ac843cbef4a6322be706b978e6691bc36c5e458f)) - refactor ([`701266e`](https://github.com/Byron/gitoxide/commit/701266e6e52456c0c1938732c260be19ec8029c9)) - conform APIs of `file::MutableValue` and `file::MutableMultiValue`. ([`0a7391a`](https://github.com/Byron/gitoxide/commit/0a7391a6575f4035c51a46d34fa20c69e9d078e9)) - `file::MutableMultiValue` escapes input values and maintains key separator specific whitespace. ([`048b925`](https://github.com/Byron/gitoxide/commit/048b92531eb877a5a128e702504891bf1e31becf)) - place spaces around `key = value` pairs, or whatever is used in the source configuration. ([`5418bc7`](https://github.com/Byron/gitoxide/commit/5418bc70e67476f8778656f2d577f1f9aa65ffbe)) - avoid extra copies when setting values and escaping them ([`a7eff01`](https://github.com/Byron/gitoxide/commit/a7eff0166f200a403d4dba320280f20a70e9afc7)) - refactor ([`15cd1d2`](https://github.com/Byron/gitoxide/commit/15cd1d2ba447ff27819f6cf398d31e96ff11b213)) - more empty-value tests ([`511985a`](https://github.com/Byron/gitoxide/commit/511985a8084f2a00e0550e5f2a85c93779385a1b)) - default space is just a single tab, not two ones ([`7e03b83`](https://github.com/Byron/gitoxide/commit/7e03b835bd6f0f5b3f00dbc63e7960ce6364eaef)) - proper escaping of value bytes to allow round-tripping after mutation ([`8118644`](https://github.com/Byron/gitoxide/commit/8118644625dc25b616e5f33c85f5100d600766e4)) - refactor ([`afa736a`](https://github.com/Byron/gitoxide/commit/afa736aba385bd52e7f11fd89538aea99787ac9d)) - a few tests for `MutableValue` showing that it's too buggy right now ([`5e6f9d9`](https://github.com/Byron/gitoxide/commit/5e6f9d909db41926e829e464abc53ef05fbf620b)) - rename `file::MutableSection::set_leading_space()` to `set_leading_whitespace()`. ([`83a0922`](https://github.com/Byron/gitoxide/commit/83a0922f06081312b79908835dac2b7f4e849bb3)) - whitespace in newly pushed keys is derived from first section value. ([`9f59356`](https://github.com/Byron/gitoxide/commit/9f59356b4f6a1f5f7f35a62c9fbe4859bf8e8e5f)) - `File::from_str()` implementation, to support `let config: File = "[core]".parse()?` ([`db1f34d`](https://github.com/Byron/gitoxide/commit/db1f34dfb855058ac08e97d4715876b5db712f61)) - whitespace in mutable sections can be finely controlled, and is derived from existing sections ([`9157717`](https://github.com/Byron/gitoxide/commit/9157717c2fb143b5decbdf60d18cc2bd99dde775)) - refactor ([`c88eea8`](https://github.com/Byron/gitoxide/commit/c88eea87d7ece807ca5b1753b47ce89d3ad6a502)) - refactor ([`a0d6caa`](https://github.com/Byron/gitoxide/commit/a0d6caa243aa293386d4ad164e1604f0e71c2cf3)) - auto-compute whitespace for sections, even though it probably needs to be better than that ([`ee9ac95`](https://github.com/Byron/gitoxide/commit/ee9ac953180886cc483e1125b7f4e172af92c3ce)) - validation for Keys and header names ([`59ec7f7`](https://github.com/Byron/gitoxide/commit/59ec7f7bf019d269573f8cc69f6d34b9458b1f1a)) - Simplify specifying keys when mutating config values. ([`a93a156`](https://github.com/Byron/gitoxide/commit/a93a156655d640ae63ff7c35b0a1f5d67a5ca20f)) - `File::rename_section()` with validation of input arguments. ([`895ce40`](https://github.com/Byron/gitoxide/commit/895ce40aabbe6d6af5b681a0d0942303fd6549a2)) - re-add newlines after multi-line values ([`9a2f597`](https://github.com/Byron/gitoxide/commit/9a2f59742cf94643c5b9967b76042bcc7a4e1a71)) - more header escaping tests ([`12cf005`](https://github.com/Byron/gitoxide/commit/12cf0052d92ee5bee1926f50c879526b5903c175)) - Enforce `parse::section::Header::new()` by making its fields private. ([`219cf7a`](https://github.com/Byron/gitoxide/commit/219cf7ae0b35b3ac92f97974be52cd022698e01f)) - `parse::Header::new(…)` with sub-section name validation ([`ae3895c`](https://github.com/Byron/gitoxide/commit/ae3895c7882e0a543a44693faee5f760b49b54d7)) - section names are now validated. ([`cfd974f`](https://github.com/Byron/gitoxide/commit/cfd974f46d2cbb99e7784a05f5e358fed0d4bcab)) - prepare for validation of `parse::section::Header` ([`00592f6`](https://github.com/Byron/gitoxide/commit/00592f6b80abe15a32a890ddc2b1fbf6701798d8)) - basic escaping of subsection names during serialization ([`00d1a9b`](https://github.com/Byron/gitoxide/commit/00d1a9b741845b49d8691262bef6e5c21876567e)) - refactor ([`9fac8e0`](https://github.com/Byron/gitoxide/commit/9fac8e0066c9b1845d9e06fb30b61ca9e9d64555)) - new roundtrip test on file level ([`78bb93c`](https://github.com/Byron/gitoxide/commit/78bb93cf35b6a990bac64bbfc56144799ad36243)) - Add `File::write_to()` and `File::to_bstring()`; remove some `TryFrom` impls. ([`4f6cd8c`](https://github.com/Byron/gitoxide/commit/4f6cd8cf65c2d8698bffe327a19031c342b229a6)) - remove `Integer::to_bstring()` as well as some `TryFrom` impls. ([`0e392f8`](https://github.com/Byron/gitoxide/commit/0e392f81e99c8c0ff29f41b9b86afd57cd99c245)) - remove `Boolean::to_bstring()` along with a few `From` impls. ([`b22732a`](https://github.com/Byron/gitoxide/commit/b22732a2ab17213c4a1020859ec41f25ccabfbfc)) - Add `parse::(Event|section::Header|Comment)::write_to(…)`. ([`d087f12`](https://github.com/Byron/gitoxide/commit/d087f12eec73626eb327eaacef8ebb3836b02381)) - fix tests on windows ([`3d7fc18`](https://github.com/Byron/gitoxide/commit/3d7fc188914337074775863acc1d6c15f47e913c)) - value normalization (via `value::normalize()` handles escape sequences. ([`f911707`](https://github.com/Byron/gitoxide/commit/f911707b455ba6f3800b85f667f91e4d56027b91)) - refactor normalization and more tests ([`cf3bf4a`](https://github.com/Byron/gitoxide/commit/cf3bf4a3bde6cdf20c63ffee1a5ae55a1f4e1742)) - more escape characters for normalization ([`b92bd58`](https://github.com/Byron/gitoxide/commit/b92bd580de45cb58cd2b3c4af430273e96139c79)) - review docs of `file::mutating` ([`2d5703e`](https://github.com/Byron/gitoxide/commit/2d5703e5909946e4327e0372097273facaeca759)) - stable sort order for `File::sections_by_name_with_header()` ([`44dfec0`](https://github.com/Byron/gitoxide/commit/44dfec07480cc2ac6fd01674b748cc03af51fed1)) - review `file::raw` module ([`6acf4a4`](https://github.com/Byron/gitoxide/commit/6acf4a43fd63c1c5e24b2e21702dc79827e3d11e)) - don't over-normalize in comfort layer - all values are normalized now ([`b979a3b`](https://github.com/Byron/gitoxide/commit/b979a3b318faada23a6cf073953b13f7828398af)) - docs for comfort level File API ([`eafc6ce`](https://github.com/Byron/gitoxide/commit/eafc6ce14a9f3d3dbc585e34e465609385f07f69)) - review and refactor 'File::value' module ([`7aa8a0b`](https://github.com/Byron/gitoxide/commit/7aa8a0b66f3508336e8c20a1a0d2b481e7b9bde8)) - allocation free `File::sections_by_name()` and `File::sections_by_name_with_header()`. ([`65c520c`](https://github.com/Byron/gitoxide/commit/65c520c4de8187884f87059adf5cef9cbdcd90a2)) - refactor ([`2abffd6`](https://github.com/Byron/gitoxide/commit/2abffd6f2224edd98f806b5dbd4fc0e1c60019c5)) - refactor ([`539c2f6`](https://github.com/Byron/gitoxide/commit/539c2f67bede1247478ce75429690c2904915a89)) - refactor ([`f1668e9`](https://github.com/Byron/gitoxide/commit/f1668e9d9e94f166fa05164612eab9ee26357d12))