From 10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:41:41 +0200 Subject: Merging upstream version 1.70.0+dfsg2. Signed-off-by: Daniel Baumann --- vendor/gix-config/.cargo-checksum.json | 1 + vendor/gix-config/CHANGELOG.md | 2167 ++++++++++++++++++++ vendor/gix-config/Cargo.toml | 117 ++ vendor/gix-config/LICENSE-APACHE | 191 ++ vendor/gix-config/LICENSE-MIT | 21 + vendor/gix-config/README.md | 54 + vendor/gix-config/src/file/access/comfort.rs | 274 +++ vendor/gix-config/src/file/access/mod.rs | 4 + vendor/gix-config/src/file/access/mutate.rs | 387 ++++ vendor/gix-config/src/file/access/raw.rs | 536 +++++ vendor/gix-config/src/file/access/read_only.rs | 353 ++++ vendor/gix-config/src/file/impls.rs | 111 + vendor/gix-config/src/file/includes/mod.rs | 319 +++ vendor/gix-config/src/file/includes/types.rs | 131 ++ vendor/gix-config/src/file/init/comfort.rs | 159 ++ vendor/gix-config/src/file/init/from_env.rs | 88 + vendor/gix-config/src/file/init/from_paths.rs | 94 + vendor/gix-config/src/file/init/mod.rs | 86 + vendor/gix-config/src/file/init/types.rs | 47 + vendor/gix-config/src/file/meta.rs | 59 + vendor/gix-config/src/file/mod.rs | 136 ++ vendor/gix-config/src/file/mutable/mod.rs | 107 + vendor/gix-config/src/file/mutable/multi_value.rs | 266 +++ vendor/gix-config/src/file/mutable/section.rs | 316 +++ vendor/gix-config/src/file/mutable/value.rs | 63 + vendor/gix-config/src/file/section/body.rs | 206 ++ vendor/gix-config/src/file/section/mod.rs | 145 ++ vendor/gix-config/src/file/tests.rs | 228 ++ vendor/gix-config/src/file/util.rs | 190 ++ vendor/gix-config/src/file/write.rs | 93 + vendor/gix-config/src/lib.rs | 52 + vendor/gix-config/src/lookup.rs | 24 + vendor/gix-config/src/parse/comment.rs | 50 + vendor/gix-config/src/parse/error.rs | 64 + vendor/gix-config/src/parse/event.rs | 83 + vendor/gix-config/src/parse/events.rs | 336 +++ vendor/gix-config/src/parse/key.rs | 35 + vendor/gix-config/src/parse/mod.rs | 116 ++ vendor/gix-config/src/parse/nom/mod.rs | 460 +++++ vendor/gix-config/src/parse/nom/tests.rs | 924 +++++++++ vendor/gix-config/src/parse/section/header.rs | 180 ++ vendor/gix-config/src/parse/section/mod.rs | 187 ++ vendor/gix-config/src/parse/section/unvalidated.rs | 25 + vendor/gix-config/src/parse/tests.rs | 162 ++ vendor/gix-config/src/source.rs | 163 ++ vendor/gix-config/src/types.rs | 124 ++ vendor/gix-config/src/value/mod.rs | 4 + vendor/gix-config/src/value/normalize.rs | 110 + 48 files changed, 10048 insertions(+) create mode 100644 vendor/gix-config/.cargo-checksum.json create mode 100644 vendor/gix-config/CHANGELOG.md create mode 100644 vendor/gix-config/Cargo.toml create mode 100644 vendor/gix-config/LICENSE-APACHE create mode 100644 vendor/gix-config/LICENSE-MIT create mode 100644 vendor/gix-config/README.md create mode 100644 vendor/gix-config/src/file/access/comfort.rs create mode 100644 vendor/gix-config/src/file/access/mod.rs create mode 100644 vendor/gix-config/src/file/access/mutate.rs create mode 100644 vendor/gix-config/src/file/access/raw.rs create mode 100644 vendor/gix-config/src/file/access/read_only.rs create mode 100644 vendor/gix-config/src/file/impls.rs create mode 100644 vendor/gix-config/src/file/includes/mod.rs create mode 100644 vendor/gix-config/src/file/includes/types.rs create mode 100644 vendor/gix-config/src/file/init/comfort.rs create mode 100644 vendor/gix-config/src/file/init/from_env.rs create mode 100644 vendor/gix-config/src/file/init/from_paths.rs create mode 100644 vendor/gix-config/src/file/init/mod.rs create mode 100644 vendor/gix-config/src/file/init/types.rs create mode 100644 vendor/gix-config/src/file/meta.rs create mode 100644 vendor/gix-config/src/file/mod.rs create mode 100644 vendor/gix-config/src/file/mutable/mod.rs create mode 100644 vendor/gix-config/src/file/mutable/multi_value.rs create mode 100644 vendor/gix-config/src/file/mutable/section.rs create mode 100644 vendor/gix-config/src/file/mutable/value.rs create mode 100644 vendor/gix-config/src/file/section/body.rs create mode 100644 vendor/gix-config/src/file/section/mod.rs create mode 100644 vendor/gix-config/src/file/tests.rs create mode 100644 vendor/gix-config/src/file/util.rs create mode 100644 vendor/gix-config/src/file/write.rs create mode 100644 vendor/gix-config/src/lib.rs create mode 100644 vendor/gix-config/src/lookup.rs create mode 100644 vendor/gix-config/src/parse/comment.rs create mode 100644 vendor/gix-config/src/parse/error.rs create mode 100644 vendor/gix-config/src/parse/event.rs create mode 100644 vendor/gix-config/src/parse/events.rs create mode 100644 vendor/gix-config/src/parse/key.rs create mode 100644 vendor/gix-config/src/parse/mod.rs create mode 100644 vendor/gix-config/src/parse/nom/mod.rs create mode 100644 vendor/gix-config/src/parse/nom/tests.rs create mode 100644 vendor/gix-config/src/parse/section/header.rs create mode 100644 vendor/gix-config/src/parse/section/mod.rs create mode 100644 vendor/gix-config/src/parse/section/unvalidated.rs create mode 100644 vendor/gix-config/src/parse/tests.rs create mode 100644 vendor/gix-config/src/source.rs create mode 100644 vendor/gix-config/src/types.rs create mode 100644 vendor/gix-config/src/value/mod.rs create mode 100644 vendor/gix-config/src/value/normalize.rs (limited to 'vendor/gix-config') diff --git a/vendor/gix-config/.cargo-checksum.json b/vendor/gix-config/.cargo-checksum.json new file mode 100644 index 000000000..973e82241 --- /dev/null +++ b/vendor/gix-config/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"CHANGELOG.md":"1ed0411cb6220e3bccbb86812ead61eca51db3194e1f0cf0b09380005e8ab12e","Cargo.toml":"980090f2bdac1cb3f34ce8e0a77c36d13ef3db5e2a40c287fedd36eb51007023","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","README.md":"83f6ef126630abc0e0a5eec8b51c559dbd56211e3a66e3ec021bcea04434f452","src/file/access/comfort.rs":"00a236fcfd4b2b37bf2d4c0763573c13a430564f01af417828d412f4827c0f45","src/file/access/mod.rs":"89141297ba7e1651c60a3637760598f8509fe651a80dc5801aace66bd2c52292","src/file/access/mutate.rs":"7396aa250717bc0a15b9da3701746c3cab0a3c6cb09342922062b26d61b0a1c1","src/file/access/raw.rs":"93267ddfe0ee7c6f41841d0346fdddb4b9eec9522701dc50c09908aac0a170d5","src/file/access/read_only.rs":"218ba05c1f014b4a2a86fcfc6cf4e8e8a34967deded0fa934d07e0119ab496c8","src/file/impls.rs":"c066fdeaeca00a8899704216be060d2b461aa21bd9800883d29e3cc0a59f5fd8","src/file/includes/mod.rs":"f82ed5445391c8442da672b7f8c92f85844ba58d35aa0dfcaf2dfa8c209307d2","src/file/includes/types.rs":"0c1c7c52cee624d840e356f0db0c7791392f89cc6ab0fc7cf074bd05d952c85a","src/file/init/comfort.rs":"0b5742d28fbb789c9bc99222fb4aa7f59c8c612e4c28ba389e19494247b60e8b","src/file/init/from_env.rs":"db5ec43667e0cd3f35d53e9d2137dbdbcd661fe8e0452c28e91ac8172c1d3af7","src/file/init/from_paths.rs":"3bac62208d6c975e489849af4f7fb5e5ece44cd0ca83647eb254f8f6da32bdc7","src/file/init/mod.rs":"3432a5eac10605c86c6fcff6dab169a8e3ddba8fe8f90603559a9e94f1ac3474","src/file/init/types.rs":"cd8d34cc012837b1acf8b55586c11d22768ce04a03874aadf044ca7cf3ed6da6","src/file/meta.rs":"02c46267b6088e7d1be3f7402929b3b98cdab71c682e1efae2c0eebd88ac97ad","src/file/mod.rs":"9e3a0a327fab36de1e83fb3d2057b43afa3e83712e00e5ab8c559e72d1d9f375","src/file/mutable/mod.rs":"ac64e210920df986e15ff4136bc7966ba15c2a2dc246fc34320ad2f6fec19ab0","src/file/mutable/multi_value.rs":"b3824387af097c410c8a9627239036e15525af5d4113ebcfbb4c48e6f8591337","src/file/mutable/section.rs":"7ac4774a3115e3446a4eb41170f835e796f561e61c7e16ae9231d0f13441ac0c","src/file/mutable/value.rs":"4211ff648477e37c4f8bcf7fa497233b09a24a8b411e57fc4be441d793377f4d","src/file/section/body.rs":"28a07cd0ec5eb580fdaf9d0199fb4d5e0e7f0ccaa80a4203036873a056adba3a","src/file/section/mod.rs":"dd79241648ee1dceb10d567dd564853062336bf428856cf9a52fafa1ffce4611","src/file/tests.rs":"cceccb786694f29e858e54a6fdc6769a64ae58989809bdd60e09041156050f1e","src/file/util.rs":"2b9c52b242c45cf7075cddf5383523c095c01ce612b9da139a853039beff6bc8","src/file/write.rs":"63e16eb5324b3482654dce16761a0b894b8bfe370aacefa21b7cd52c8bc3cab5","src/lib.rs":"b0d5ec429067741a1e3b0e5820e24d1af614282f14bd818fe3919acb3239ba44","src/lookup.rs":"205df00cabf25f0fd3709325e75cdc2c1cd2af4ef86bbd15253543a9bb962e62","src/parse/comment.rs":"dfe1ad56385490062792c59b3068552e847b9c55b7a91ee480b7ea6026f12889","src/parse/error.rs":"7e3ce30c7036cb6900be5e751657b879fc8a7dcab760f10ea481d4a57a90b347","src/parse/event.rs":"02110fb38c7f1ea3eff1cecccc6c39f4a60958f18ab6d73220b104c2d6bd7213","src/parse/events.rs":"2b1fb245c00a66810a7ac52e477acb734c82b20811e4a61940110cd56103237c","src/parse/key.rs":"6922c4d0293546bc6b9a97364a6dc97b9cdb0c8ba8ffdc44c059be63ce4c16c7","src/parse/mod.rs":"c7f3d4fa2c3888e1390de84864f23b3368f08c1480817c9b4cb76b6d07025bb0","src/parse/nom/mod.rs":"b7525ffd344f1e149978822d1cca369186cabc3986be43a54e4336043d0bf8b6","src/parse/nom/tests.rs":"6841d40eb8580a166bd5f3fdcacdcde5702527126e886239847fd29d87df2cf7","src/parse/section/header.rs":"0d7a1a4d892ac5c0abd86c4951f4806f159ea7c37dbe89bfc86b67dfe76014ec","src/parse/section/mod.rs":"5be22e4d120a12a59be38fcb25a95ce7b0e581ded53e99311ffb0f3780ac841a","src/parse/section/unvalidated.rs":"ffbc552e5c6f78fca05ad05f703fef9889777c22facb526ea5fca9c0121ae8c4","src/parse/tests.rs":"911f6972060feb521448f4e6ec9824ff524a9bc51d80fe1460548a6b88036dc4","src/source.rs":"19871a85b0cd0ccee37e33cbbc6c1ba7c92cb4137a6828f877faacd42cb5609a","src/types.rs":"9f4b61b86e1e438cd31518c478b16c9f97f626f1bcea8b93fee7797c82d6be0d","src/value/mod.rs":"1e46a250fc69cecb11d762290fa0c5a2b8f51451541e9e457d0bacafd160e54d","src/value/normalize.rs":"54ca650fdaaf24124df0c6d9137eb90dfda314b28386778970aa25e6b01397f5"},"package":"52c62e26ce11f607712e4f49a0a192ed87675d30187fd61be070abbd607d12f1"} \ No newline at end of file diff --git a/vendor/gix-config/CHANGELOG.md b/vendor/gix-config/CHANGELOG.md new file mode 100644 index 000000000..874fb2a14 --- /dev/null +++ b/vendor/gix-config/CHANGELOG.md @@ -0,0 +1,2167 @@ +# 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.18.0 (2023-03-04) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 2 commits contributed to the release. + - 3 days passed between releases. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Prepare changelogs prior to release ([`895e482`](https://github.com/Byron/gitoxide/commit/895e482badf01e953bb9144001eebd5e1b1c4d84)) + - Release gix-features v0.28.0, gix-actor v0.19.0, gix-object v0.28.0, gix-diff v0.28.0, gix-traverse v0.24.0, gix-pack v0.32.0, safety bump 20 crates ([`0f411e9`](https://github.com/Byron/gitoxide/commit/0f411e93ec812592bb9d3a52b751399dd86f76f7)) +
+ +## 0.17.0 (2023-03-01) + +A maintenance release without user-facing changes. + +### Commit Statistics + + + + - 6 commits contributed to the release over the course of 3 calendar days. + - 8 days passed between releases. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-tempfile v4.1.0, gix-lock v4.0.0, gix-ref v0.25.0, gix-config v0.17.0, gix-url v0.14.0, gix-credentials v0.10.0, gix-diff v0.27.0, gix-discover v0.14.0, gix-hashtable v0.1.2, gix-bitmap v0.2.2, gix-traverse v0.23.0, gix-index v0.13.0, gix-mailmap v0.10.0, gix-pack v0.31.0, gix-odb v0.41.0, gix-transport v0.26.0, gix-protocol v0.27.0, gix-revision v0.11.0, gix-refspec v0.8.0, gix-worktree v0.13.0, gix v0.38.0, safety bump 6 crates ([`ea9fd1d`](https://github.com/Byron/gitoxide/commit/ea9fd1d9b60e1e9e17042e9e37c06525823c40a5)) + - Release gix-features v0.27.0, gix-actor v0.18.0, gix-quote v0.4.3, gix-attributes v0.9.0, gix-object v0.27.0, gix-ref v0.25.0, gix-config v0.17.0, gix-url v0.14.0, gix-credentials v0.10.0, gix-diff v0.27.0, gix-discover v0.14.0, gix-hashtable v0.1.2, gix-bitmap v0.2.2, gix-traverse v0.23.0, gix-index v0.13.0, gix-mailmap v0.10.0, gix-pack v0.31.0, gix-odb v0.41.0, gix-transport v0.26.0, gix-protocol v0.27.0, gix-revision v0.11.0, gix-refspec v0.8.0, gix-worktree v0.13.0, gix v0.38.0 ([`e6cc618`](https://github.com/Byron/gitoxide/commit/e6cc6184a7a49dbc2503c1c1bdd3688ca5cec5fe)) + - Adjust manifests prior to release ([`addd789`](https://github.com/Byron/gitoxide/commit/addd78958fdd1e54eb702854e96079539d01965a)) + - Prepare changelogs prior to release ([`94c99c7`](https://github.com/Byron/gitoxide/commit/94c99c71520f33269cc8dbc26f82a74747cc7e16)) + - Prepare for git-tempfile release ([`56c005b`](https://github.com/Byron/gitoxide/commit/56c005b13c44376f71e61781e73c0bf93416d0e4)) + - Make fmt ([`8ef1cb2`](https://github.com/Byron/gitoxide/commit/8ef1cb293434c7b9e1fda4a6963368e0435920a9)) +
+ +## 0.16.3 (2023-02-21) + +A maintenance release to restore MSRV (1.64) support. + +### Commit Statistics + + + + - 3 commits contributed to the release. + - 0 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-config v0.16.3, gix v0.37.1 ([`a3c283f`](https://github.com/Byron/gitoxide/commit/a3c283ff0e3f21cedb3ba7cd464fdfa0f5133af0)) + - Prepare changelogs prior to release ([`362d659`](https://github.com/Byron/gitoxide/commit/362d659f946ca1ff2cbf915766113a34a9df97b3)) + - Restore msrv compatibility by removing sole `if let ... else` ([`9160659`](https://github.com/Byron/gitoxide/commit/91606597b714a6e9b3a2c071bdb08baeacd6056b)) +
+ +## 0.16.2 (2023-02-20) + +### New Features + + - add `File::write_to_filter()` to have a filter select the section to write. + This way, one can selectively write sections to a file, based on the section's origin + or other meta-data. + + For convenience sake, most mutating methods on `SectionMut` can now be chained as well. + - add `File::set_meta()` to affect what metadata new sections receive. + That way it's possible to better control the metadata associated with new sections, + given that the config file metadata may not truly reflect its identity anymore since it + can be a combination from many different files with various sources. + +### Bug Fixes + + - note that crates have been renamed from `git-*` to `gix-*`. + This also means that the `git-*` prefixed crates of the `gitoxide` project + are effectively unmaintained. + Use the crates with the `gix-*` prefix instead. + + If you were using `git-repository`, then `gix` is its substitute. + - `File::section(...)` could panic due to invlid expectation. + This has been fixed to prevent panics. + - compatibility with `bstr` v1.3, use `*.as_bytes()` instead of `.as_ref()`. + `as_ref()` relies on a known target type which isn't always present. However, once + there is only one implementation, that's no problem, but when that changes compilation + fails due to ambiguity. + +### Commit Statistics + + + + - 3 commits contributed to the release. + - 3 days passed between releases. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release gix-date v0.4.3, gix-hash v0.10.3, gix-features v0.26.5, gix-actor v0.17.2, gix-glob v0.5.5, gix-path v0.7.2, gix-quote v0.4.2, gix-attributes v0.8.3, gix-validate v0.7.3, gix-object v0.26.2, gix-ref v0.24.1, gix-config v0.16.2, gix-command v0.2.4, gix-url v0.13.3, gix-credentials v0.9.2, gix-discover v0.13.1, gix-index v0.12.4, gix-mailmap v0.9.3, gix-pack v0.30.3, gix-packetline v0.14.3, gix-transport v0.25.6, gix-protocol v0.26.4, gix-revision v0.10.4, gix-refspec v0.7.3, gix-worktree v0.12.3, gix v0.36.1 ([`9604783`](https://github.com/Byron/gitoxide/commit/96047839a20a657a559376b0b14c65aeab96acbd)) + - Compatibility with `bstr` v1.3, use `*.as_bytes()` instead of `.as_ref()`. ([`135d317`](https://github.com/Byron/gitoxide/commit/135d317065aae87af302beb6c26bb6ca8e30b6aa)) + - Release gix-glob v0.5.4 ([`c56d336`](https://github.com/Byron/gitoxide/commit/c56d3365fde21120cf6101cf34f8b5669804977c)) +
+ +## 0.16.1 (2023-02-17) + + + + + + + + + + + + +A maintenance release without user-facing changes. + +### 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. + - `File::raw_multi_value()` to `File::raw_values()` + - `File::raw_multi_value_mut()` to `File::raw_values_mut()` + - `File::multi_value()` to `File::values()`. + The latter is better in line with `string()/strings()` + +### Bug Fixes (BREAKING) + + - subsections are identified as `&BStr` in entire API. + Technically they can be any value (except for newlines and unescaped double quotes), + and these values might be paths and everything that comes with it, like + illformed UTF8. In order to be able to represent everything that + git can represent, we don't enforce UTF8 anymore for subsection names. + + Note that section names and key names are required to be valid UTF8 + (and even alphanumeric ascii), which makes illformed UTF8 very unlikely + there. + - 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 + `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. + - Remove `git-config` test utilities from `git-path`. + +### New Features (BREAKING) + + - transfer knowledge about configuration and its usage into the type system. + That way it's possible to use configuration overrides, even though ultimately being strings, + in a type-safe manner and leverage code-completion while at it. + + In that process, we also change `Repository::(committer|Author)()` to return + `Option>` to be able to account for date parse errors. + - `File::new_section()` and related now returns their `id` as well. + That way it's possible to more easily interact with it later, for instance + when one wants to delete it. + - upgrade edition to 2021 in most crates. + MSRV for this is 1.56, and we are now at 1.60 so should be compatible. + This isn't more than a patch release as it should break nobody + who is adhering to the MSRV, but let's be careful and mark it + breaking. + + Note that `git-features` and `git-pack` are still on edition 2018 + as they make use of a workaround to support (safe) mutable access + to non-overlapping entries in a slice which doesn't work anymore + in edition 2021. + - `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. + - 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. + - 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-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. + - Make `realpath()` easier to use by introducing `realpath_opt()`. + That way there is consistency about how many symlinks to follow. + +### Changed (BREAKING) + + - Add `Kind::GitInstallation` for a way to obtain special git-installation configuration paths. + Note that these are lazily cached as they call the `git` binary. + - upgrade `bstr` to `1.0.1` + - Add `File::set_raw_value()` to unconditionally set single values, and make the value itself easier to provide. + - add `File::resolve_includes()` and move its error type to `file::includes`. + - add `File::from_bytes_owned()` and remove `File::from_path_with_buf()` + - remove `File::from_env_paths()`. + It's replaced by its more comfortable `new_globals()`. + - 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. + - rename `parse::Comment::(comment_tag|comment)` to `::tag|text` and `parse::Section::section_header` to `::header`. + - 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. + - rename `file::SectionBody` to `file::section::Body`. + - Remove `File::sections_by_name_with_header()` as `::sections_by_name()` now returns entire sections. + - create `resolve_includes` options to make space for more options when loading paths. + - rename `path::Options` into `path::Context`. + It's not an option if it's required context to perform a certain + operation. + - All accessors in `File` are now using `impl AsRef` where possible for added comfort. + - Much more comfortable API `file::*Mut` types thanks to `impl Into/AsRef`. + - Rename `Mutable*` into `$1Mut` for consistency. + - 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. + - rename `file::MutableSection::set_leading_space()` to `set_leading_whitespace()`. + The corresponding getter was renamed as well to `leading_whitespace()`. + - Enforce `parse::section::Header::new()` by making its fields private. + - 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. + - remove `Integer::to_bstring()` as well as some `TryFrom` impls. + Note that it can still display itself like before via + `std::fmt::Display`. + - 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`. + - allocation free `File::sections_by_name()` and `File::sections_by_name_with_header()`. + - `Path::interpolate()` now takes `path::interpolate::Options` instead of three parameters. + - remove `String` type in favor of referring to the `File::string()` method. + The wrapper had no effect whatsoever except for adding complexity. + - 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. + - 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. + - simplify `Color` API. + For now we only parse and serialize for display, but more uses are + enabled when needed and trivially. + - 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. + - 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 of `File::default()`. + - rename `parse::event::List` to `parse::Events` + - rename `parse::State` to `parse::event::List` + - move `value::*` into the crate root, except for `Error` and `normalize_*()`. + - rename `value::parse::Error` to `value::Error`. + - rename `value::TrueVariant` to `value::boolean::True` + - rename `IntegerSuffix` to `integer::Suffix` + - rename `value::Color(Attribute|Value)` to `value::color::Attribute` and `value::color::Name`. + - Turn `parse::ParseOrIoError` into `parse::state::from_path::Error` + - rename `parse::ParsedComment` into `parse::Comment` + - rename `parse::Section*` related types. + These are now located in `section::*`. + - rename `parse::Parser` to `parse::State`. + Furthermore, make `State` the entry point for all parsing, removing + all free-standing functions that returned a `State`. + - rename `parser` module to `parse` + - rename `normalize_cow()` to `normalize()` and move all `normalize*` functions from `values` to the `value` module + - move `Path` from `values` to `value` module + - Move `Boolean` and `String` from `values` into `value` module + - move `values::Integer` into `value` module + - move `Color` to own `value` module + - 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. + - `File::len()` -> `File::num_values()` + The same is true for `Section::len()` which now is + `Section::num_values()`. + - `GitConfig::from_paths(…,