1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Byte-oriented Git configuration parsing and explicit layered resolution.
//!
//! # Parsing, resolving, and editing configuration
//!
//! - [`Config::parse`] reads one supplied byte source without I/O.
//! - [`Config::from_decoded_sections`] preserves supplied decoded occurrences without parsing.
//! - [`Config::resolve`] reads explicit [`ConfigInputs`], expands includes, and records [`Origin`]
//! for each occurrence. Re-resolve when the caller needs a fresh snapshot.
//! - [`Document`] preserves direct-file syntax for editing; [`ConfigEdit`] holds the file lock
//! through publication. Typed interpretation and policy remain with the caller.
//!
//! [`crate::Repository::open_with_config`] adds repository sources while keeping format bootstrap
//! separate. No operation reads or mutates process-global environment.
#![warn(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::unreachable,
clippy::indexing_slicing,
reason = "parses untrusted repository or network input (#103)"
)]
mod command_environment;
mod decoded;
pub use decoded::{DecodedEntry, DecodedSection};
mod document;
mod edit;
pub use edit::{ConfigEdit, EditError};
mod parse;
pub use document::{Document, DocumentSection};
mod options;
pub use options::{
IncludeConditionVisibility, IncludeDirectiveCase, ResolveOptions, UnresolvedIncludePath,
};
mod placement;
pub use placement::IncludePlacement;
mod resolution;
mod sources;
mod values;
mod wildmatch;
pub use parse::{Config, ConfigError, ConfigSection, Entry, InvalidValue};
pub use resolution::{ResolveError, ResolveFailure};
pub use sources::{
ConfigFile, ConfigInputs, ConfigScope, IncludeContext, Origin, ResolveLimits, SourceLocation,
};
pub(crate) use values::{boolean, integer};
#[cfg(test)]
mod options_tests;
#[cfg(test)]
mod user_home_tests;