github Byron/gitoxide git-config-v0.3.0
git-config v0.3.0

latest releases: gix-object-v0.42.3, gix-actor-v0.31.4, gix-mailmap-v0.23.4...
2 years ago

New Features

  • GitConfig::path() for direct access to paths.
    Very similar to string(), but as path, whose query can never fail.

  • add suppport for android
    Do not interpolate ~user/ on Android (Termux).
    There is no meaning of it. It is single user system.

  • support for try_value(), boolean() and string() access. Support for a convenient way of knowing if a value does or doesn't exist via try_value()`, which can only fail if the conversion fails.

    Lastly, string() is a special case which doesn't fail as there is
    no conversion, and boolean() allows to obtain a plain boolean value
    if it was a valid boolean representation.

  • new hierarchical errors for value lookup

Changed (BREAKING)

  • remove values::*Error in favor of value::parse::Error.
    This makes it easier to work with errors in practice, we are either
    interested in the value that failed to parse to try something else
    or want a nice user message.

    Having one decode error type facilitates that.

  • switch from quickerror to thiserror.
    This allows for generic types for sources of errors and allows to
    workaround a limitation with associated type constraints in the MSRV
    of 1.54.

    Using thiserror makes this work and brings the crate more closely
    to the rest of the gitoxide crates (which now prefer thiserror over
    quickerror).

  • remove all get_ prefixes from methods
    That way the API is more idiomatic and fits better into the
    existing gitoxide crates.

  • use lookup::Error and lookup::existing::Error
    Use the newly introduced structured error to replace the 'catch-all'
    GitConfigError while getting closer to naming conventions in other
    gitoxide crates.

Commit Statistics

  • 37 commits contributed to the release over the course of 20 calendar days.
  • 43 days passed between releases.
  • 8 commits where understood as conventional.
  • 5 unique issues were worked on: #298, #301, #331, #386, #404

Thanks Clippy

Clippy helped 4 times to make code idiomatic.

Commit Details

view details
  • #298
  • #301
    • update changelogs prior to release (84cb256)
    • Some notes about of 'path' will soon have to be amended with more safety (97e53f6)
    • GitConfig::path() for direct access to paths. (7c75eac)
    • remove values::*Error in favor of value::parse::Error. (38dfdcf)
    • A sketch of what can be a general value decode error (4612fca)
    • Remove IntegerSuffix error which wasn't ever used (732c0fa)
    • make fmt (5fc5459)
    • support for try_value(), boolean() and string() access`. (dc3dc3b)
    • fix build warnings (4496b5a)
    • switch from quickerror to thiserror. (a98a7a7)
    • remove all #[inline] attributes (8aef1d3)
    • remove all get_ prefixes from methods (a86b254)
    • use lookup::Error and lookup::existing::Error (f9aaac1)
    • new hierarchical errors for value lookup (13554f8)
  • #331
    • refactor (92fe564)
    • Remove untested error case in integger parsing (2b21a35)
    • validate underflow as well (83eda34)
    • Case-insensitive integer suffix handling (9034bd4)
    • refactor tests (f943d2a)
  • #386
    • Sketch Permissions for git-config (8443330)
  • #404
    • Add test to clarify underscores in sections headers aren't allowed (47079d4)
  • Uncategorized
    • Merge branch 'basic-worktree-support' (e058bda)
    • Merge branch 'main' into msrv-for-windows (7cb1972)
    • Merge branch 'main' into git-sec (2fe70f9)
    • thanks clippy (5bf6b52)
    • thanks clippy (273895a)
    • add suppport for android (031bd2f)
    • Update doc comment. (322f825)
    • thanks clippy (53f27e0)
    • Handle overflow. (61c5285)
    • Merge branch 'worktree-stack' (e90d3fd)
    • Add doc comment. (001862a)
    • Canonicalize ´git_config::values::Integer` values as simple decimal numbers. (03f360a)
    • Refactor values tests. (ee4ad7e)
    • thanks clippy (1e2b239)
    • do not treat empty values in sections like multi-line values (8b9432c)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.