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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
use IncludePlacement;
/// Explicit include evaluation choices, independent of source discovery and trust.
///
/// Defaults preserve [`super::Config::resolve`]. These choices never discover paths or read the
/// process environment; interpolation uses the caller's [`super::IncludeContext`].
///
/// Choose nondefault evaluation only to meet an explicit consumer contract. Placement controls
/// effective output order; it does not change source validation order or establish the
/// trustworthiness of included files.
///
/// ```
/// use girt::Config;
/// use girt::config::{ConfigInputs, ResolveOptions, UnresolvedIncludePath};
/// let inputs = ConfigInputs::default()
/// .with_command(Some(Config::parse(b"[include]\npath = ~/unmapped\n")?));
/// assert!(Config::resolve(&inputs).is_err());
/// let options =
/// ResolveOptions::default().with_unresolved_paths(UnresolvedIncludePath::Skip);
/// let resolved = Config::resolve_with_options(&inputs, options)?;
/// assert!(resolved.value("include", None, "path").is_some()); // Directive retained, expansion skipped.
/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```
/// Remote URL visibility while evaluating `hasconfig:remote.*.url:` conditions.
///
/// Keep [`Self::AllInputs`] for ordinary Git-style resolution. [`Self::RootSnapshot`] serves
/// consumers requiring root-local frozen URL visibility; it can select different include subtrees,
/// so choose it as an explicit compatibility policy. Choose it when each source must be evaluated
/// independently of remote URLs supplied by other scopes, rather than allowing a later command
/// override to select an earlier file's conditional include. It also permits selected conditional
/// children to add URLs.
/// Case matching for include directive section names; `path` keys always ignore ASCII case.
///
/// Keep [`Self::Insensitive`] matching for ordinary resolution. [`Self::Canonical`] is an explicit
/// consumer policy that can leave differently cased include sections inert; it does not change
/// ordinary variable-name matching. Choose it only when adapting a consumer whose decoded directive
/// vocabulary distinguishes exact `include`/`includeIf` spellings; differently cased sections
/// then remain ordinary data. Use [`Self::Insensitive`] for files shared with ordinary Git
/// resolution.
/// Treatment of include paths whose requested interpolation context was not supplied.
///
/// Use [`Self::Error`] when configuration must be complete. [`Self::Skip`] permits deliberate
/// partial interpretation without home/prefix context; retained directives still do not become
/// resolved sources.