summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2021-04-19 12:31:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-19 21:16:59 (GMT)
commitc62a999c6e595692ee3bd8ff1e9435491872a79c (patch)
treebbda6898b85ce5893693498835ed11fd2681ef9a /config.h
parent89b43f80a514aee58b662ad606e6352e03eaeee4 (diff)
downloadgit-c62a999c6e595692ee3bd8ff1e9435491872a79c.zip
git-c62a999c6e595692ee3bd8ff1e9435491872a79c.tar.gz
git-c62a999c6e595692ee3bd8ff1e9435491872a79c.tar.bz2
config: rename `git_etc_config()`
The `git_etc_gitconfig()` function retrieves the system-level path of the configuration file. We're about to introduce a way to override it via an environment variable, at which point the name of this function would start to become misleading. Rename the function to `git_system_config()` as a preparatory step. While at it, the function is also refactored to pass memory ownership to the caller. This is done to better match semantics of `git_global_config()`, which is going to be introduced in the next commit. 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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.h b/config.h
index 19a9adb..2be8fa1 100644
--- a/config.h
+++ b/config.h
@@ -318,7 +318,6 @@ int git_config_rename_section(const char *, const char *);
int git_config_rename_section_in_file(const char *, const char *, const char *);
int git_config_copy_section(const char *, const char *);
int git_config_copy_section_in_file(const char *, const char *, const char *);
-const char *git_etc_gitconfig(void);
int git_env_bool(const char *, int);
unsigned long git_env_ulong(const char *, unsigned long);
int git_config_system(void);
@@ -327,6 +326,8 @@ int config_error_nonbool(const char *);
#define config_error_nonbool(s) (config_error_nonbool(s), const_error())
#endif
+char *git_system_config(void);
+
int git_config_parse_parameter(const char *, config_fn_t fn, void *data);
enum config_scope current_config_scope(void);