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/CHANGELOG.md | 2167 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2167 insertions(+) create mode 100644 vendor/gix-config/CHANGELOG.md (limited to 'vendor/gix-config/CHANGELOG.md') 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(…,