Expand description
Reading and writing git configuration through a library.
Spawning git config is not an option: git starts a filter process per
operation, so it would be N process spawns on the hot path — most expensive
on exactly the platform where it hurts most. Writing only ever touches the
repository-local file, which is the only one this tool has business changing.
Functions§
- get
- Reads a dotted key, if present.
- global_
attributes_ file - The global attributes file, resolved the way git resolves it.
- is_true
- Whether a value is one of git’s spellings of true.
- open_
full - The configuration git itself would see, for reading only.
- open_
local - The repository-local configuration, loaded for editing.
- save_
local - Writes a configuration file back to disk, replacing it in one step.
- set
- Sets a dotted key such as
filter.git-xcrypt.required, creating what is missing. - unset
- Removes a dotted key, if it is there at all.