diff options
author | Glen Choo <chooglen@google.com> | 2023-06-28 21:26:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-28 23:06:40 +0200 |
commit | 908857a9f8a63c7d8fee1bd5f52b1aa1cf3434de (patch) | |
tree | f178e1b38ffac07467950f959689028745fd365f /config.h | |
parent | config.c: remove config_reader from configsets (diff) | |
download | git-908857a9f8a63c7d8fee1bd5f52b1aa1cf3434de.tar.xz git-908857a9f8a63c7d8fee1bd5f52b1aa1cf3434de.zip |
config: add kvi.path, use it to evaluate includes
Include directives are evaluated using the path of the config file. To
reduce the dependence on "config_reader.source", add a new
"key_value_info.path" member and use that instead of
"config_source.path". This allows us to remove a "struct config_reader
*" field from "struct config_include_data", which will subsequently
allow us to remove "struct config_reader" entirely.
Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -116,12 +116,14 @@ struct key_value_info { int linenr; enum config_origin_type origin_type; enum config_scope scope; + const char *path; }; #define KVI_INIT { \ .filename = NULL, \ .linenr = -1, \ .origin_type = CONFIG_ORIGIN_UNKNOWN, \ .scope = CONFIG_SCOPE_UNKNOWN, \ + .path = NULL, \ } /* Captures additional information that a config callback can use. */ |