#git #gitoxide #reader-writer #wrapper #high-level

deprecated git-config

Please use gix-<thiscrate> instead (‘git’ -> ‘gix’)

34 releases (16 breaking)

0.16.2 Feb 17, 2023
0.15.1 Jan 10, 2023
0.14.0 Dec 30, 2022
0.12.0 Nov 21, 2022
0.0.0 Oct 5, 2020

#70 in #gitoxide

Download history 106/week @ 2023-12-18 97/week @ 2023-12-25 74/week @ 2024-01-01 99/week @ 2024-01-08 111/week @ 2024-01-15 64/week @ 2024-01-22 61/week @ 2024-01-29 127/week @ 2024-02-05 124/week @ 2024-02-12 152/week @ 2024-02-19 257/week @ 2024-02-26 145/week @ 2024-03-04 271/week @ 2024-03-11 249/week @ 2024-03-18 62/week @ 2024-03-25 1099/week @ 2024-04-01

1,701 downloads per month
Used in 9 crates (3 directly)

MIT/Apache

690KB
13K SLoC

git-config

git-config is a library for interacting with git-config files.

This crate intents to be a performant Rust implementation for reading and writing git-config files. It exposes tiers of abstractions, from simple config value wrappers to a high level reader and writer.

The highlight of this crate is the zero-copy parser. We employ techniques to avoid copying where necessary, and reads that do not need normalization are guaranteed to be zero-copy. Higher level abstractions maintain this guarantee, and utilizes acceleration structures for increased performance.

Currently, this is not a binary. While we do intent to have a drop-in replacement for the git config sub-command, we're currently missing system-level abstractions to do so.

Contributing

Contributions are always welcome!

Code quality

This repository enables pedantic, cargo, and nursery clippy lints. Make sure to run cargo clean && cargo clippy (the clean stage is very important!) to ensure your code is linted.

Testing

Since this is a performance oriented crate, in addition to well tested code via cargo test, we also perform benchmarks to measure notable gains or losses in performance. We use criterion so benches can be run via cargo bench after installing it via cargo install cargo-criterion.

Changes to parsing code may include a request to fuzz to ensure that it cannot panic on inputs. This can be done by executing cargo +nightly fuzz run parse after installing the fuzz sub-command via cargo install cargo-fuzz.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in git-config by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~7–41MB
~575K SLoC