diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-12 13:29:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-12 19:15:40 +0200 |
commit | c0b03e8b6d9361277557ac93b23980d7fe6e751b (patch) | |
tree | f24eee878155feec80137e8e62c7c43ecd087bef /config.h | |
parent | environment: make `get_git_work_tree()` accept a repository (diff) | |
download | git-c0b03e8b6d9361277557ac93b23980d7fe6e751b.tar.xz git-c0b03e8b6d9361277557ac93b23980d7fe6e751b.zip |
config: document `read_early_config()` and `read_very_early_config()`
It's not clear what `read_early_config()` and `read_very_early_config()`
do differently compared to `repo_read_config()` from just looking at
their names. Document both of these in the header file to clarify their
intent.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -192,7 +192,18 @@ int git_config_from_blob_oid(config_fn_t fn, const char *name, void git_config_push_parameter(const char *text); void git_config_push_env(const char *spec); int git_config_from_parameters(config_fn_t fn, void *data); + +/* + * Read config when the Git directory has not yet been set up. In case + * `the_repository` has not yet been set up, try to discover the Git + * directory to read the configuration from. + */ void read_early_config(config_fn_t cb, void *data); + +/* + * Read config but only enumerate system and global settings. + * Omit any repo-local, worktree-local, or command-line settings. + */ void read_very_early_config(config_fn_t cb, void *data); /** |