From c62a999c6e595692ee3bd8ff1e9435491872a79c Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 19 Apr 2021 14:31:08 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config.h') diff --git a/config.h b/config.h index 19a9adbaa9..2be8fa1880 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); -- cgit v1.2.3