config: provide an "origin" for config entries by ethomson · Pull Request #6615 · libgit2/libgit2

added 6 commits

July 19, 2023 11:17
Don't set entry data when we "get" an entry from the collection, add the
data to the entry before it's put into the collection. This keeps the
entry creation logic in a single place.
The opaque `payload` on an entry is unnecessary and distracting; config
entries should follow the patterns of other objects and use space
elsewhere in the structure with a "base" config entry struct embedded.
A git_config_entry now knows the type of the origin for the entry
("file", "memory", etc) and the path details (for files, the path on
disk). This is propagated through snapshots.
Provide two memory-backed configuration backends -- one that takes a
string in config file format `[section] key=value` and one that takes a
list of strings in `section.key=value` format.

vincenzopalazzo

@ethomson ethomson deleted the ethomson/config_origin branch

August 14, 2023 19:40