Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Choo <chooglen@google.com>2023-06-28 22:26:29 +0300
committerJunio C Hamano <gitster@pobox.com>2023-06-29 00:06:40 +0300
commit908857a9f8a63c7d8fee1bd5f52b1aa1cf3434de (patch)
treef178e1b38ffac07467950f959689028745fd365f /config.h
parentf6c213a0cbf7071c845eef0afa4bc5f9c4883e51 (diff)
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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.h b/config.h
index bd366ddb5e..b5573e67a0 100644
--- a/config.h
+++ b/config.h
@@ -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. */