config: rename global config function
Rename this function to a more descriptive name since we want to use the existing name for a new function. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kristoffer Haugsbakk committed
Jan 18, 2024 at 17:12 UTC
ecffa3ed51aaa7af0119542ce31a1be5f40edcf9
5 files changed
+7
-7
builtin/config.c
+1
-1
@@ -710,7 +710,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
710
if (use_global_config) {
711
char *user_config, *xdg_config;
712
713
- git_global_config(&user_config, &xdg_config);
713
+ git_global_config_paths(&user_config, &xdg_config);
714
if (!user_config)
715
/*
716
* It is unknown if HOME/.gitconfig exists, so
builtin/gc.c
+2
-2
@@ -1546,7 +1546,7 @@ static int maintenance_register(int argc, const char **argv, const char *prefix)
1546
char *user_config = NULL, *xdg_config = NULL;
1547
1548
if (!config_file) {
1549
- git_global_config(&user_config, &xdg_config);
1549
+ git_global_config_paths(&user_config, &xdg_config);
1550
config_file = user_config;
1551
if (!user_config)
1552
die(_("$HOME not set"));
@@ -1614,7 +1614,7 @@ static int maintenance_unregister(int argc, const char **argv, const char *prefi
1614
int rc;
1615
char *user_config = NULL, *xdg_config = NULL;
1616
if (!config_file) {
1617
- git_global_config(&user_config, &xdg_config);
1617
+ git_global_config_paths(&user_config, &xdg_config);
1618
config_file = user_config;
1619
if (!user_config)
1620
die(_("$HOME not set"));
builtin/var.c
+1
-1
@@ -90,7 +90,7 @@ static char *git_config_val_global(int ident_flag UNUSED)
90
char *user, *xdg;
91
size_t unused;
92
93
- git_global_config(&user, &xdg);
93
+ git_global_config_paths(&user, &xdg);
94
if (xdg && *xdg) {
95
normalize_path_copy(xdg, xdg);
96
strbuf_addf(&buf, "%s\n", xdg);
config.c
+2
-2
@@ -1987,7 +1987,7 @@ char *git_system_config(void)
1987
return system_config;
1988
}
1989
1990
-void git_global_config(char **user_out, char **xdg_out)
1990
+void git_global_config_paths(char **user_out, char **xdg_out)
1991
{
1992
char *user_config = xstrdup_or_null(getenv("GIT_CONFIG_GLOBAL"));
1993
char *xdg_config = NULL;
@@ -2040,7 +2040,7 @@ static int do_git_config_sequence(const struct config_options *opts,
2040
data, CONFIG_SCOPE_SYSTEM,
2041
NULL);
2042
2043
- git_global_config(&user_config, &xdg_config);
2043
+ git_global_config_paths(&user_config, &xdg_config);
2044
2045
if (xdg_config && !access_or_die(xdg_config, R_OK, ACCESS_EACCES_OK))
2046
ret += git_config_from_file_with_options(fn, xdg_config, data,
config.h
+1
-1
@@ -382,7 +382,7 @@ int config_error_nonbool(const char *);
382
#endif
383
384
char *git_system_config(void);
385
-void git_global_config(char **user, char **xdg);
385
+void git_global_config_paths(char **user, char **xdg);
386
387
int git_config_parse_parameter(const char *, config_fn_t fn, void *data);
388